summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-07 13:16:30 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-07 14:21:55 +0100
commitb4577903f572ebb21641b4444c630c76ef5accf4 (patch)
treec76c8322f0f8cd47b7319e2f26d8b240299d5e78 /writerfilter/source
parent14641f650e548ad3341809a22deb46f5ec93fa24 (diff)
DOCX import: handle NS_ooxml::LN_CT_Style_autoRedefine
Change-Id: I8c2c0ca8d060e2c460d0f36aed3050ed335fb3a3
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx10
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx1
2 files changed, 9 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index fcb04fbd9428..b34273ace4ce 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -64,6 +64,7 @@ StyleSheetEntry::StyleSheetEntry() :
,sBaseStyleIdentifier()
,sNextStyleIdentifier()
,pProperties(new StyleSheetPropertyMap)
+ ,bAutoRedefine(false)
{
}
@@ -586,12 +587,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
m_pImpl->m_pCurrentEntry->sNextStyleIdentifier = sStringValue;
break;
case NS_ooxml::LN_CT_Style_aliases:
- case NS_ooxml::LN_CT_Style_autoRedefine:
case NS_ooxml::LN_CT_Style_hidden:
case NS_ooxml::LN_CT_Style_personal:
case NS_ooxml::LN_CT_Style_personalCompose:
case NS_ooxml::LN_CT_Style_personalReply:
break;
+ case NS_ooxml::LN_CT_Style_autoRedefine:
+ m_pImpl->m_pCurrentEntry->bAutoRedefine = nIntValue;
+ break;
case NS_ooxml::LN_CT_Style_tcPr:
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
@@ -1198,11 +1201,14 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
}
beans::PropertyValues aGrabBag = pEntry->GetInteropGrabBagSeq();
+ uno::Reference<beans::XPropertySet> xPropertySet(xStyle, uno::UNO_QUERY);
if (aGrabBag.hasElements())
{
- uno::Reference<beans::XPropertySet> xPropertySet(xStyle, uno::UNO_QUERY);
xPropertySet->setPropertyValue("StyleInteropGrabBag", uno::makeAny(aGrabBag));
}
+
+ if (pEntry->bAutoRedefine)
+ xPropertySet->setPropertyValue("IsAutoUpdate", uno::makeAny(sal_True));
}
else if(pEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
{
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 25c3065f800e..d74eadfc83f3 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -67,6 +67,7 @@ public:
OUString sConvertedStyleName;
std::vector<beans::PropertyValue> aLatentStyles; ///< Attributes of latentStyles
std::vector<beans::PropertyValue> aLsdExceptions; ///< List of lsdException attribute lists
+ bool bAutoRedefine; ///< Writer calls this auto-update.
void AppendInteropGrabBag(beans::PropertyValue aValue);
beans::PropertyValue GetInteropGrabBag(); ///< Used for table styles, has a name.