fdo#64232: Add font theme info to CharInteropGrabBag
The attributes w:*Theme in the rFonts tag are saved to the character InteropGrabBag so they can be saved back to the document on export. Font attributes are also pushed into the grab bag because they will be needed to check if the user has modified the fonts while editing the document. Change-Id: Ib247845a2d5543823798e1bbd8ed1958a5d9e884
This commit is contained in:
parent
fb5ee5c995
commit
0fa60a7f5c
@ -951,12 +951,19 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
|
||||
case NS_ooxml::LN_CT_Fonts_asciiTheme:
|
||||
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "asciiTheme", ThemeTable::getStringForTheme(nIntValue));
|
||||
if (m_pImpl->GetTopContext())
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme(nIntValue) ));
|
||||
{
|
||||
uno::Any aPropValue = uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme( nIntValue ) );
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, aPropValue );
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_FONT_NAME_ASCII, aPropValue, true, CHAR_GRAB_BAG );
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_NAME_ASCII, uno::makeAny( ThemeTable::getStringForTheme(nIntValue) ), true, CHAR_GRAB_BAG);
|
||||
}
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Fonts_hAnsi:
|
||||
break;//unsupported
|
||||
case NS_ooxml::LN_CT_Fonts_hAnsiTheme:
|
||||
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "hAnsiTheme", ThemeTable::getStringForTheme(nIntValue));
|
||||
if (m_pImpl->GetTopContext())
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_NAME_H_ANSI, uno::makeAny( ThemeTable::getStringForTheme(nIntValue) ), true, CHAR_GRAB_BAG);
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Fonts_eastAsia:
|
||||
if (m_pImpl->GetTopContext())
|
||||
@ -974,7 +981,12 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
|
||||
case NS_ooxml::LN_CT_Fonts_cstheme:
|
||||
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "cstheme", ThemeTable::getStringForTheme(nIntValue));
|
||||
if (m_pImpl->GetTopContext())
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_COMPLEX, uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme(nIntValue) ));
|
||||
{
|
||||
uno::Any aPropValue = uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme( nIntValue ) );
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_COMPLEX, aPropValue );
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_FONT_NAME_CS, aPropValue, true, CHAR_GRAB_BAG );
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_NAME_CS, uno::makeAny( ThemeTable::getStringForTheme(nIntValue) ), true, CHAR_GRAB_BAG);
|
||||
}
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Spacing_before:
|
||||
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "before", OUString::number(nIntValue));
|
||||
|
@ -345,6 +345,12 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
|
||||
case PROP_PARA_SHADOW_FORMAT: sName = "ParaShadowFormat"; break;
|
||||
case PROP_FOOTNOTE_LINE_RELATIVE_WIDTH: sName = "FootnoteLineRelativeWidth"; break;
|
||||
case PROP_TBL_HEADER: sName = "TblHeader"; break;
|
||||
case PROP_CHAR_THEME_NAME_ASCII : sName = "CharThemeNameAscii"; break;
|
||||
case PROP_CHAR_THEME_NAME_CS : sName = "CharThemeNameCs"; break;
|
||||
case PROP_CHAR_THEME_NAME_H_ANSI : sName = "CharThemeNameHAnsi"; break;
|
||||
case PROP_CHAR_THEME_FONT_NAME_ASCII : sName = "CharThemeFontNameAscii"; break;
|
||||
case PROP_CHAR_THEME_FONT_NAME_CS : sName = "CharThemeFontNameCs"; break;
|
||||
case PROP_CHAR_THEME_FONT_NAME_H_ANSI : sName = "CharThemeFontNameHAnsi"; break;
|
||||
}
|
||||
::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt =
|
||||
m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName ));
|
||||
|
@ -316,6 +316,12 @@ enum PropertyIds
|
||||
,PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING
|
||||
,PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING
|
||||
,PROP_TBL_HEADER
|
||||
,PROP_CHAR_THEME_NAME_ASCII
|
||||
,PROP_CHAR_THEME_NAME_CS
|
||||
,PROP_CHAR_THEME_NAME_H_ANSI
|
||||
,PROP_CHAR_THEME_FONT_NAME_ASCII
|
||||
,PROP_CHAR_THEME_FONT_NAME_CS
|
||||
,PROP_CHAR_THEME_FONT_NAME_H_ANSI
|
||||
};
|
||||
struct PropertyNameSupplier_Impl;
|
||||
class PropertyNameSupplier
|
||||
|
Loading…
x
Reference in New Issue
Block a user