summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-10-28 16:32:34 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-10-28 16:49:37 +0100
commit95e2a96f02512943eaa796facd238667de4bd964 (patch)
tree9b31bf2af9830ed36843a720547143b5fb4c9109 /sw
parentf924cf3c2203be22631e6a3c631f712558fd8161 (diff)
DOCX filter: roundtrip semiHidden and unhideWhenUsed for table styles
Change-Id: Ie7073a6346553650741a1631096342318d650890
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx10
2 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index d3dcf42f544d..9db8db856392 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1454,6 +1454,8 @@ void Test::testStyleInheritance()
// Table style wasn't roundtripped.
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:tblPr/w:tblCellMar/w:left", "w", "108");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:semiHidden", 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:unhideWhenUsed", 1);
}
void Test::testCalendar1()
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3fafa965e9d2..089f7351ec80 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2811,7 +2811,7 @@ void lcl_TableStyleTcPr(sax_fastparser::FSHelperPtr pSerializer, uno::Sequence<b
void DocxAttributeOutput::TableStyle(uno::Sequence<beans::PropertyValue>& rStyle)
{
- bool bDefault = false, bCustomStyle = false, bQFormat = false;
+ bool bDefault = false, bCustomStyle = false, bQFormat = false, bSemiHidden = false, bUnhideWhenUsed = false;
OUString aStyleId, aName, aBasedOn;
sal_Int32 nUiPriority = 0, nRsid = 0;
uno::Sequence<beans::PropertyValue> aTblPr, aTcPr;
@@ -2831,6 +2831,10 @@ void DocxAttributeOutput::TableStyle(uno::Sequence<beans::PropertyValue>& rStyle
nUiPriority = rStyle[i].Value.get<sal_Int32>();
else if (rStyle[i].Name == "qFormat")
bQFormat = true;
+ else if (rStyle[i].Name == "semiHidden")
+ bSemiHidden = true;
+ else if (rStyle[i].Name == "unhideWhenUsed")
+ bUnhideWhenUsed = true;
else if (rStyle[i].Name == "rsid")
nRsid = rStyle[i].Value.get<sal_Int32>();
else if (rStyle[i].Name == "tblPr")
@@ -2863,6 +2867,10 @@ void DocxAttributeOutput::TableStyle(uno::Sequence<beans::PropertyValue>& rStyle
FSEND);
if (bQFormat)
m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
+ if (bSemiHidden)
+ m_pSerializer->singleElementNS(XML_w, XML_semiHidden, FSEND);
+ if (bUnhideWhenUsed)
+ m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
if (nRsid)
{
// We want the rsid as a hex string, but always with the length of 8.