Kaydet (Commit) d5c420b3 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: save styleId / name / isDefault for table styles

Change-Id: Ib422584d2f6cbb8bfd88dd67aef96b8b062c3d38
üst 0ed8f752
...@@ -176,7 +176,7 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask, StyleSheetE ...@@ -176,7 +176,7 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask, StyleSheetE
beans::PropertyValue TableStyleSheetEntry::GetInteropGrabBag() beans::PropertyValue TableStyleSheetEntry::GetInteropGrabBag()
{ {
beans::PropertyValue aRet; beans::PropertyValue aRet;
aRet.Name = sStyleName; aRet.Name = sStyleIdentifierI;
uno::Sequence<beans::PropertyValue> aSeq(m_aInteropGrabBag.size()); uno::Sequence<beans::PropertyValue> aSeq(m_aInteropGrabBag.size());
beans::PropertyValue* pSeq = aSeq.getArray(); beans::PropertyValue* pSeq = aSeq.getArray();
...@@ -477,12 +477,28 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val) ...@@ -477,12 +477,28 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
break; break;
case NS_ooxml::LN_CT_Style_default: case NS_ooxml::LN_CT_Style_default:
m_pImpl->m_pCurrentEntry->bIsDefaultStyle = (nIntValue != 0); m_pImpl->m_pCurrentEntry->bIsDefaultStyle = (nIntValue != 0);
if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
{
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
aValue.Name = "default";
aValue.Value = uno::makeAny(sal_Bool(pTableEntry->bIsDefaultStyle));
pTableEntry->AppendInteropGrabBag(aValue);
}
break; break;
case NS_ooxml::LN_CT_Style_customStyle: case NS_ooxml::LN_CT_Style_customStyle:
break; break;
case NS_ooxml::LN_CT_Style_styleId: case NS_ooxml::LN_CT_Style_styleId:
m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue; m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue;
m_pImpl->m_pCurrentEntry->sStyleIdentifierD = sValue; m_pImpl->m_pCurrentEntry->sStyleIdentifierD = sValue;
if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
{
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
aValue.Name = "styleId";
aValue.Value = uno::makeAny(sValue);
pTableEntry->AppendInteropGrabBag(aValue);
}
break; break;
case NS_ooxml::LN_CT_TblWidth_w: case NS_ooxml::LN_CT_TblWidth_w:
dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TblWidth_w( nIntValue ); dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TblWidth_w( nIntValue );
...@@ -533,6 +549,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm) ...@@ -533,6 +549,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
//this is only a UI name! //this is only a UI name!
m_pImpl->m_pCurrentEntry->sStyleName = sStringValue; m_pImpl->m_pCurrentEntry->sStyleName = sStringValue;
m_pImpl->m_pCurrentEntry->sStyleName1 = sStringValue; m_pImpl->m_pCurrentEntry->sStyleName1 = sStringValue;
if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
{
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
aValue.Name = "name";
aValue.Value = uno::makeAny(sStringValue);
pTableEntry->AppendInteropGrabBag(aValue);
}
break; break;
case NS_ooxml::LN_CT_Style_basedOn: case NS_ooxml::LN_CT_Style_basedOn:
m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier = sStringValue; m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier = sStringValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment