sw/qa/extras/ooxmlexport/data/calendar2.docx           |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx               |   14 +++
 sw/source/filter/ww8/docxtablestyleexport.cxx          |   39 +++++++---
 writerfilter/source/dmapper/BorderHandler.cxx          |   66 ++++++++++++++++-
 writerfilter/source/dmapper/BorderHandler.hxx          |    6 +
 writerfilter/source/dmapper/DomainMapper.cxx           |   12 ++-
 writerfilter/source/dmapper/TDefTableHandler.cxx       |    9 +-
 writerfilter/source/dmapper/TDefTableHandler.hxx       |    2 
 writerfilter/source/dmapper/TablePropertiesHandler.cxx |    4 +
 9 files changed, 134 insertions(+), 18 deletions(-)

New commits:
commit f91775c00dfd50e89cfcbc280d90309a5d08d727
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Oct 31 17:05:57 2013 +0100

    writerfilter: implement BorderHandler::getInteropGrabBag()
    
    Change-Id: I86922585122898692dc4fb1fbbee11e1864dad29

diff --git a/sw/qa/extras/ooxmlexport/data/calendar2.docx 
b/sw/qa/extras/ooxmlexport/data/calendar2.docx
new file mode 100644
index 0000000..e89222f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/calendar2.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index f63dd4a..86e50ad 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1323,6 +1323,20 @@ DECLARE_OOXML_TEST(testCalendar1, "calendar1.docx")
     assertXPath(pXmlStyles, 
"/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='band2Horz']/w:tcPr/w:tcBorders/w:top",
 "themeColor", "text1");
 }
 
+DECLARE_OOXML_TEST(testCalendar2, "calendar2.docx")
+{
+    // This paragraph property was missing in table style.
+    xmlDocPtr pXmlStyles = parseExport("word/styles.xml");
+    assertXPath(pXmlStyles, 
"/w:styles/w:style[@w:styleId='Calendar2']/w:pPr/w:jc", "val", "center");
+
+    // These run properties were missing
+    assertXPath(pXmlStyles, 
"/w:styles/w:style[@w:styleId='Calendar2']/w:rPr/w:lang", "val", "en-US");
+    assertXPath(pXmlStyles, 
"/w:styles/w:style[@w:styleId='Calendar2']/w:rPr/w:lang", "bidi", "ar-SA");
+
+    // Table borders were also missing
+    assertXPath(pXmlStyles, 
"/w:styles/w:style[@w:styleId='Calendar2']/w:tblPr/w:tblBorders/w:insideV", 
"themeTint", "99");
+}
+
 DECLARE_OOXML_TEST(testSmartart, "smartart.docx")
 {
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, 
uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx 
b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 940301f..cc92461 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -97,6 +97,7 @@ static DocxStringTokenMap const aTcBorderTokens[] = {
     {"color", XML_color},
     {"space", XML_space},
     {"themeColor", XML_themeColor},
+    {"themeTint", XML_themeTint},
     {0, 0}
 };
 
@@ -129,17 +130,17 @@ DocxStringTokenMap const aTcBordersTokens[] = {
     {0, 0}
 };
 
-/// Export of w:tcBorders in a table style.
-void lcl_TableStyleTcBorders(sax_fastparser::FSHelperPtr pSerializer, 
uno::Sequence<beans::PropertyValue>& rTcBorders)
+/// Export of w:tcBorders (and w:tblBorders) in a table style.
+void lcl_TableStyleTcBorders(sax_fastparser::FSHelperPtr pSerializer, 
uno::Sequence<beans::PropertyValue>& rTcBorders, sal_Int32 nToken = 
XML_tcBorders)
 {
     if (!rTcBorders.hasElements())
         return;
 
-    pSerializer->startElementNS(XML_w, XML_tcBorders, FSEND);
+    pSerializer->startElementNS(XML_w, nToken, FSEND);
     for (sal_Int32 i = 0; i < rTcBorders.getLength(); ++i)
-        if (sal_Int32 nToken = DocxStringGetToken(aTcBordersTokens, 
rTcBorders[i].Name))
-            lcl_TableStyleTcBorder(pSerializer, nToken, 
rTcBorders[i].Value.get< uno::Sequence<beans::PropertyValue> >());
-    pSerializer->endElementNS(XML_w, XML_tcBorders);
+        if (sal_Int32 nSubToken = DocxStringGetToken(aTcBordersTokens, 
rTcBorders[i].Name))
+            lcl_TableStyleTcBorder(pSerializer, nSubToken, 
rTcBorders[i].Value.get< uno::Sequence<beans::PropertyValue> >());
+    pSerializer->endElementNS(XML_w, nToken);
 }
 
 /// Export of w:shd in a table style.
@@ -189,6 +190,10 @@ void lcl_TableStyleRLang(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<
     {
         if (rLang[i].Name == "eastAsia")
             pAttributeList->add(FSNS(XML_w, XML_eastAsia), 
OUStringToOString(rLang[i].Value.get<OUString>(), 
RTL_TEXTENCODING_UTF8).getStr());
+        else if (rLang[i].Name == "val")
+            pAttributeList->add(FSNS(XML_w, XML_val), 
OUStringToOString(rLang[i].Value.get<OUString>(), 
RTL_TEXTENCODING_UTF8).getStr());
+        else if (rLang[i].Name == "bidi")
+            pAttributeList->add(FSNS(XML_w, XML_bidi), 
OUStringToOString(rLang[i].Value.get<OUString>(), 
RTL_TEXTENCODING_UTF8).getStr());
     }
     sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList);
     pSerializer->singleElementNS(XML_w, XML_lang, xAttributeList);
@@ -280,7 +285,7 @@ void lcl_TableStyleRPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<be
     pSerializer->startElementNS(XML_w, XML_rPr, FSEND);
 
     uno::Sequence<beans::PropertyValue> aRFonts, aLang, aColor;
-    OUString aB, aI, aSz;
+    OUString aB, aI, aSz, aSzCs;
     for (sal_Int32 i = 0; i < rRPr.getLength(); ++i)
     {
         if (rRPr[i].Name == "rFonts")
@@ -295,6 +300,8 @@ void lcl_TableStyleRPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<be
             aColor = rRPr[i].Value.get< uno::Sequence<beans::PropertyValue> 
>();
         else if (rRPr[i].Name == "sz")
             aSz = rRPr[i].Value.get<OUString>();
+        else if (rRPr[i].Name == "szCs")
+            aSzCs = rRPr[i].Value.get<OUString>();
     }
     lcl_TableStyleRRFonts(pSerializer, aRFonts);
     lcl_TableStyleRLang(pSerializer, aLang);
@@ -305,6 +312,10 @@ void lcl_TableStyleRPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<be
         pSerializer->singleElementNS(XML_w, XML_sz,
                 FSNS(XML_w, XML_val), OUStringToOString(aSz, 
RTL_TEXTENCODING_UTF8).getStr(),
                 FSEND);
+    if (!aSzCs.isEmpty())
+        pSerializer->singleElementNS(XML_w, XML_szCs,
+                FSNS(XML_w, XML_val), OUStringToOString(aSzCs, 
RTL_TEXTENCODING_UTF8).getStr(),
+                FSEND);
 
     pSerializer->endElementNS(XML_w, XML_rPr);
 }
@@ -319,16 +330,23 @@ void lcl_TableStylePPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<be
 
     uno::Sequence<beans::PropertyValue> aSpacing;
     bool bWordWrap = false;
+    OUString aJc;
     for (sal_Int32 i = 0; i < rPPr.getLength(); ++i)
     {
         if (rPPr[i].Name == "spacing")
             aSpacing = rPPr[i].Value.get< uno::Sequence<beans::PropertyValue> 
>();
-        if (rPPr[i].Name == "wordWrap")
+        else if (rPPr[i].Name == "wordWrap")
             bWordWrap = true;
+        else if (rPPr[i].Name == "jc")
+            aJc = rPPr[i].Value.get<OUString>();
     }
     if (bWordWrap)
         pSerializer->singleElementNS(XML_w, XML_wordWrap, FSEND);
     lcl_TableStylePSpacing(pSerializer, aSpacing);
+    if (!aJc.isEmpty())
+        pSerializer->singleElementNS(XML_w, XML_jc,
+                FSNS(XML_w, XML_val), OUStringToOString(aJc, 
RTL_TEXTENCODING_UTF8).getStr(),
+                FSEND);
 
     pSerializer->endElementNS(XML_w, XML_pPr);
 }
@@ -341,7 +359,7 @@ void lcl_TableStyleTblPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<
 
     pSerializer->startElementNS(XML_w, XML_tblPr, FSEND);
 
-    uno::Sequence<beans::PropertyValue> aTblInd, aTblCellMar;
+    uno::Sequence<beans::PropertyValue> aTblInd, aTblBorders, aTblCellMar;
     boost::optional<sal_Int32> oTblStyleRowBandSize, oTblStyleColBandSize;
     for (sal_Int32 i = 0; i < rTblPr.getLength(); ++i)
     {
@@ -351,6 +369,8 @@ void lcl_TableStyleTblPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<
             oTblStyleColBandSize = rTblPr[i].Value.get<sal_Int32>();
         else if (rTblPr[i].Name == "tblInd")
             aTblInd = rTblPr[i].Value.get< uno::Sequence<beans::PropertyValue> 
>();
+        else if (rTblPr[i].Name == "tblBorders")
+            aTblBorders = rTblPr[i].Value.get< 
uno::Sequence<beans::PropertyValue> >();
         else if (rTblPr[i].Name == "tblCellMar")
             aTblCellMar = rTblPr[i].Value.get< 
uno::Sequence<beans::PropertyValue> >();
     }
@@ -363,6 +383,7 @@ void lcl_TableStyleTblPr(sax_fastparser::FSHelperPtr 
pSerializer, uno::Sequence<
                 FSNS(XML_w, XML_val), 
OString::number(oTblStyleColBandSize.get()),
                 FSEND);
     lcl_TableStyleTblInd(pSerializer, aTblInd);
+    lcl_TableStyleTcBorders(pSerializer, aTblBorders, XML_tblBorders);
     lcl_TableStyleTblCellMar(pSerializer, aTblCellMar);
 
     pSerializer->endElementNS(XML_w, XML_tblPr);
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx 
b/writerfilter/source/dmapper/BorderHandler.cxx
index a5d8560..c010c13 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include <BorderHandler.hxx>
+#include <TDefTableHandler.hxx>
 #include <PropertyMap.hxx>
 #include <resourcemodel/QNameToString.hxx>
 #include <doctok/resourceids.hxx>
@@ -24,6 +25,7 @@
 #include <com/sun/star/table/BorderLine2.hpp>
 #include <ooxml/resourceids.hxx>
 #include <dmapperLoggers.hxx>
+#include <filter/msfilter/util.hxx>
 
 namespace writerfilter {
 
@@ -72,16 +74,20 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
         case NS_rtf::LN_DPTLINEWIDTH: // 0x2871
             //  width of a single line in 1/8 pt, max of 32 pt -> twip * 5 / 2.
             m_nLineWidth = nIntValue * 5 / 2;
+            appendGrabBag("sz", OUString::number(nIntValue));
         break;
         case NS_rtf::LN_BRCTYPE:    // 0x2872
             m_nLineType = nIntValue;
+            appendGrabBag("val", 
TDefTableHandler::getBorderTypeString(nIntValue));
         break;
         case NS_ooxml::LN_CT_Border_color:
         case NS_rtf::LN_ICO:        // 0x2873
             m_nLineColor = nIntValue;
+            appendGrabBag("color", 
OStringToOUString(msfilter::util::ConvertColor(nIntValue), 
RTL_TEXTENCODING_UTF8));
         break;
         case NS_rtf::LN_DPTSPACE:   // border distance in points
             m_nLineDistance = ConversionHelper::convertTwipToMM100( nIntValue 
* 20 );
+            appendGrabBag("space", OUString::number(nIntValue));
         break;
         case NS_rtf::LN_FSHADOW:    // 0x2875
             m_bShadow = nIntValue;
@@ -90,8 +96,12 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
         case NS_rtf::LN_UNUSED2_15: // 0x2877
             // ignored
         break;
-        case NS_ooxml::LN_CT_Border_themeTint: break;
-        case NS_ooxml::LN_CT_Border_themeColor: break;
+        case NS_ooxml::LN_CT_Border_themeTint:
+            appendGrabBag("themeTint", OUString::number(nIntValue, 16));
+            break;
+        case NS_ooxml::LN_CT_Border_themeColor:
+            appendGrabBag("themeColor", 
TDefTableHandler::getThemeColorTypeString(nIntValue));
+            break;
         default:
             OSL_FAIL( "unknown attribute");
     }
@@ -101,31 +111,40 @@ void BorderHandler::lcl_sprm(Sprm & rSprm)
 {
     BorderPosition pos = BORDER_COUNT; // invalid pos
     bool rtl = false; // TODO detect
+    OUString aBorderPos;
     switch( rSprm.getId())
     {
         case NS_ooxml::LN_CT_TblBorders_top:
             pos = BORDER_TOP;
+            aBorderPos = "top";
             break;
         case NS_ooxml::LN_CT_TblBorders_start:
             pos = rtl ? BORDER_RIGHT : BORDER_LEFT;
+            aBorderPos = "start";
             break;
         case NS_ooxml::LN_CT_TblBorders_left:
             pos = BORDER_LEFT;
+            aBorderPos = "left";
             break;
         case NS_ooxml::LN_CT_TblBorders_bottom:
             pos = BORDER_BOTTOM;
+            aBorderPos = "bottom";
             break;
         case NS_ooxml::LN_CT_TblBorders_end:
             pos = rtl ? BORDER_LEFT : BORDER_RIGHT;
+            aBorderPos = "end";
             break;
         case NS_ooxml::LN_CT_TblBorders_right:
             pos = BORDER_RIGHT;
+            aBorderPos = "right";
             break;
         case NS_ooxml::LN_CT_TblBorders_insideH:
             pos = BORDER_HORIZONTAL;
+            aBorderPos = "insideH";
             break;
         case NS_ooxml::LN_CT_TblBorders_insideV:
             pos = BORDER_VERTICAL;
+            aBorderPos = "insideV";
             break;
         default:
             break;
@@ -134,7 +153,20 @@ void BorderHandler::lcl_sprm(Sprm & rSprm)
     {
         writerfilter::Reference<Properties>::Pointer_t pProperties = 
rSprm.getProps();
         if( pProperties.get())
+        {
+            std::vector<beans::PropertyValue> aSavedGrabBag;
+            if (!m_aInteropGrabBagName.isEmpty())
+            {
+                aSavedGrabBag = m_aInteropGrabBag;
+                m_aInteropGrabBag.clear();
+            }
             pProperties->resolve(*this);
+            if (!m_aInteropGrabBagName.isEmpty())
+            {
+                aSavedGrabBag.push_back(getInteropGrabBag(aBorderPos));
+                m_aInteropGrabBag = aSavedGrabBag;
+            }
+        }
         ConversionHelper::MakeBorderLine( m_nLineWidth,   m_nLineType, 
m_nLineColor,
                                m_aBorderLines[ pos ], m_bOOXML );
         m_aFilledLines[ pos ] = true;
@@ -180,6 +212,36 @@ bool BorderHandler::getShadow()
     return m_bShadow;
 }
 
+void BorderHandler::enableInteropGrabBag(OUString aName)
+{
+    m_aInteropGrabBagName = aName;
+}
+
+beans::PropertyValue BorderHandler::getInteropGrabBag(OUString aName)
+{
+    beans::PropertyValue aRet;
+    if (aName.isEmpty())
+        aRet.Name = m_aInteropGrabBagName;
+    else
+        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;
+}
+
+void BorderHandler::appendGrabBag(OUString aKey, OUString aValue)
+{
+    beans::PropertyValue aProperty;
+    aProperty.Name = aKey;
+    aProperty.Value = uno::makeAny(aValue);
+    m_aInteropGrabBag.push_back(aProperty);
+}
+
 } //namespace dmapper
 } //namespace writerfilter
 
diff --git a/writerfilter/source/dmapper/BorderHandler.hxx 
b/writerfilter/source/dmapper/BorderHandler.hxx
index 3d43c4a..692d7ca 100644
--- a/writerfilter/source/dmapper/BorderHandler.hxx
+++ b/writerfilter/source/dmapper/BorderHandler.hxx
@@ -23,6 +23,7 @@
 #include <resourcemodel/LoggedResources.hxx>
 #include <boost/shared_ptr.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
 
 namespace writerfilter {
 namespace dmapper
@@ -55,6 +56,9 @@ private:
 
     bool                                        m_aFilledLines[BORDER_COUNT];
     ::com::sun::star::table::BorderLine2        m_aBorderLines[BORDER_COUNT];
+    OUString m_aInteropGrabBagName;
+    std::vector<beans::PropertyValue> m_aInteropGrabBag;
+    void appendGrabBag(OUString aKey, OUString aValue);
 
     // Properties
     virtual void lcl_attribute(Id Name, Value & val);
@@ -68,6 +72,8 @@ public:
     ::com::sun::star::table::BorderLine2        getBorderLine();
     sal_Int32                                   getLineDistance() const { 
return m_nLineDistance;}
     bool                                        getShadow();
+    void enableInteropGrabBag(OUString aName);
+    beans::PropertyValue getInteropGrabBag(OUString aName = OUString());
 };
 typedef boost::shared_ptr< BorderHandler >          BorderHandlerPtr;
 }}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index a0c4bef..0d48d99 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1168,6 +1168,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
         {
             if (nName == NS_ooxml::LN_CT_Language_eastAsia)
                 m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, 
"eastAsia", sStringValue);
+            else if (nName == NS_ooxml::LN_CT_Language_val)
+                m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "val", 
sStringValue);
+            else if (nName == NS_ooxml::LN_CT_Language_bidi)
+                m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "bidi", 
sStringValue);
             lang::Locale aLocale( LanguageTag::convertToLocale( sStringValue));
             if (m_pImpl->GetTopContext())
                 
m_pImpl->GetTopContext()->Insert(NS_ooxml::LN_CT_Language_val== nName ? 
PROP_CHAR_LOCALE :
@@ -2251,8 +2255,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, 
PropertyMapPtr rContext, SprmType
             // Make sure char sizes defined in the stylesheets don't affect 
char props from direct formatting.
             if (!m_pImpl->IsStyleSheetImport())
                 m_pImpl->deferCharacterProperty( nSprmId, uno::makeAny( 
nIntValue ));
-            if (nSprmId == NS_sprm::LN_CHps)
-                m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "sz", 
OUString::number(nIntValue));
+            m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, (nSprmId == 
NS_sprm::LN_CHps ? OUString("sz") : OUString("szCs")), 
OUString::number(nIntValue));
         }
         break;
     case NS_sprm::LN_CHpsInc:
@@ -4056,19 +4059,23 @@ void DomainMapper::handleParaJustification(const 
sal_Int32 nIntValue, const ::bo
 {
     sal_Int16 nAdjust = 0;
     sal_Int16 nLastLineAdjust = 0;
+    OUString aStringValue = "left";
     switch(nIntValue)
     {
     case 1:
         nAdjust = style::ParagraphAdjust_CENTER;
+        aStringValue = "center";
         break;
     case 2:
         nAdjust = static_cast< sal_Int16 > (bExchangeLeftRight ? 
style::ParagraphAdjust_LEFT : style::ParagraphAdjust_RIGHT);
+        aStringValue = "right";
         break;
     case 4:
         nLastLineAdjust = style::ParagraphAdjust_BLOCK;
         //no break;
     case 3:
         nAdjust = style::ParagraphAdjust_BLOCK;
+        aStringValue = "both";
         break;
     case 0:
     default:
@@ -4077,6 +4084,7 @@ void DomainMapper::handleParaJustification(const 
sal_Int32 nIntValue, const ::bo
     }
     pContext->Insert( PROP_PARA_ADJUST, uno::makeAny( nAdjust ) );
     pContext->Insert( PROP_PARA_LAST_LINE_ADJUST, uno::makeAny( 
nLastLineAdjust ) );
+    m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "jc", aStringValue);
 }
 
 bool DomainMapper::getColorFromIndex(const sal_Int32 nIndex, sal_Int32 &nColor)
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx 
b/writerfilter/source/dmapper/TDefTableHandler.cxx
index f242f28..737ddef 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -50,7 +50,7 @@ TDefTableHandler::~TDefTableHandler()
 {
 }
 
-OUString lcl_getBorderTypeString(sal_Int32 nType)
+OUString TDefTableHandler::getBorderTypeString(sal_Int32 nType)
 {
     switch (nType)
     {
@@ -250,7 +250,7 @@ OUString lcl_getBorderTypeString(sal_Int32 nType)
     return OUString();
 }
 
-OUString lcl_getThemeColorTypeString(sal_Int32 nType)
+OUString TDefTableHandler::getThemeColorTypeString(sal_Int32 nType)
 {
     switch (nType)
     {
@@ -332,7 +332,7 @@ void TDefTableHandler::lcl_attribute(Id rName, Value & rVal)
         break;
         case NS_rtf::LN_BRCTYPE:    // 0x2872
             m_nLineType = nIntValue;
-            appendGrabBag("val", lcl_getBorderTypeString(nIntValue));
+            appendGrabBag("val", 
TDefTableHandler::getBorderTypeString(nIntValue));
         break;
         case NS_ooxml::LN_CT_Border_color:
         case NS_rtf::LN_ICO:        // 0x2873
@@ -350,7 +350,7 @@ void TDefTableHandler::lcl_attribute(Id rName, Value & rVal)
             // ignored
         break;
         case NS_ooxml::LN_CT_Border_themeColor:
-            appendGrabBag("themeColor", 
lcl_getThemeColorTypeString(nIntValue));
+            appendGrabBag("themeColor", 
TDefTableHandler::getThemeColorTypeString(nIntValue));
         break;
         case NS_ooxml::LN_CT_Border_themeTint:
         case NS_ooxml::LN_CT_Border_themeShade:
@@ -373,7 +373,6 @@ void TDefTableHandler::localResolve(Id rName, 
writerfilter::Reference<Properties
             aSavedGrabBag = m_aInteropGrabBag;
             m_aInteropGrabBag.clear();
         }
-        m_aInteropGrabBag.clear();
         pProperties->resolve( *this );
         table::BorderLine2 aBorderLine;
         ConversionHelper::MakeBorderLine( m_nLineWidth,   m_nLineType, 
m_nLineColor,
diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx 
b/writerfilter/source/dmapper/TDefTableHandler.hxx
index 993baf7..11be966 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.hxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.hxx
@@ -82,6 +82,8 @@ public:
     sal_Int32                                   getTableWidth() const;
     void enableInteropGrabBag(OUString aName);
     beans::PropertyValue getInteropGrabBag(OUString aName = OUString());
+    static OUString getBorderTypeString(sal_Int32 nType);
+    static OUString getThemeColorTypeString(sal_Int32 nType);
 };
 typedef boost::shared_ptr< TDefTableHandler >          TDefTableHandlerPtr;
 }}
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx 
b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index fe64c47..824cd0b 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -169,7 +169,11 @@ namespace dmapper {
                 if( pProperties.get())
                 {
                     BorderHandlerPtr pBorderHandler( new 
BorderHandler(m_bOOXML) );
+                    if (m_pCurrentInteropGrabBag)
+                        pBorderHandler->enableInteropGrabBag("tblBorders");
                     pProperties->resolve(*pBorderHandler);
+                    if (m_pCurrentInteropGrabBag)
+                        
m_pCurrentInteropGrabBag->push_back(pBorderHandler->getInteropGrabBag());
                     TablePropertyMapPtr pTablePropMap( new TablePropertyMap );
                     
pTablePropMap->InsertProps(pBorderHandler->getProperties());
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to