Kaydet (Commit) 25dc9aaf authored tarafından Jacobo Aragunde Pérez's avatar Jacobo Aragunde Pérez

ooxml: preserve font theme color shade property

Change-Id: I40fa3f172f98b319a97a855231b854651be2d784
üst 3d126bcf
......@@ -2062,6 +2062,8 @@ DECLARE_OOXMLEXPORT_TEST(testThemePreservation, "theme-preservation.docx")
// check theme font color value has been preserved
assertXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w:color", "themeColor", "accent3");
OUString sThemeShade = getXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w:color", "themeShade");
CPPUNIT_ASSERT_EQUAL(sThemeShade.toInt32(16), 0xbf);
// check the themeFontLang values in settings file
xmlDocPtr pXmlSettings = parseExport("word/settings.xml");
......
......@@ -6216,6 +6216,15 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
m_pColorAttrList->add( FSNS( XML_w, XML_themeColor ),
OUStringToOString( str, RTL_TEXTENCODING_UTF8 ) );
}
else if ( i->first == "CharThemeColorShade" )
{
i->second >>= str;
if( !m_pColorAttrList )
m_pColorAttrList = m_pSerializer->createAttrList();
m_pColorAttrList->add( FSNS( XML_w, XML_themeShade ),
OUStringToOString( str, RTL_TEXTENCODING_UTF8 ) );
}
else if( i->first == "CharThemeFontNameCs" ||
i->first == "CharThemeFontNameAscii" ||
i->first == "CharThemeFontNameEastAsia" ||
......
......@@ -3110,6 +3110,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_ORIGINAL_COLOR, aIter->Value, true, CHAR_GRAB_BAG);
else if (aIter->Name == "themeColor")
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_COLOR, aIter->Value, true, CHAR_GRAB_BAG);
else if (aIter->Name == "themeShade")
m_pImpl->GetTopContext()->Insert(PROP_CHAR_THEME_COLOR_SHADE, aIter->Value, true, CHAR_GRAB_BAG);
}
if (m_pImpl->m_aInteropGrabBagName == "TempColorPropsGrabBag")
{
......
......@@ -357,6 +357,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
case PROP_CHAR_THEME_FONT_NAME_EAST_ASIA: sName = "CharThemeFontNameEastAsia"; break;
case PROP_CHAR_THEME_COLOR : sName = "CharThemeColor"; break;
case PROP_CHAR_THEME_ORIGINAL_COLOR : sName = "CharThemeOriginalColor"; break;
case PROP_CHAR_THEME_COLOR_SHADE : sName = "CharThemeColorShade"; break;
}
::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt =
m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName ));
......
......@@ -328,6 +328,7 @@ enum PropertyIds
,PROP_CHAR_THEME_FONT_NAME_EAST_ASIA
,PROP_CHAR_THEME_COLOR
,PROP_CHAR_THEME_ORIGINAL_COLOR
,PROP_CHAR_THEME_COLOR_SHADE
};
struct PropertyNameSupplier_Impl;
class PropertyNameSupplier
......
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