return;
}
try
{
final FontFaceDeclsSection currentFonts = stylesCollection.getFontFaceDecls();
final FontFaceDeclsSection predefFonts = predefCollection.getFontFaceDecls();
final String fontName = (String)
textProperties.getAttribute(OfficeNamespaces.STYLE_NS, "font-name");
if (fontName != null)
{
if (currentFonts.containsFont(fontName) == false)
{
final FontFaceElement element = predefFonts.getFontFace(fontName);
if (element != null)
{
currentFonts.addFontFace((FontFaceElement) element.clone());
}
}
}
final String fontNameAsian = (String)
textProperties.getAttribute(OfficeNamespaces.STYLE_NS,
"font-name-asian");
if (fontNameAsian != null)
{
if (currentFonts.containsFont(fontNameAsian) == false)
{
final FontFaceElement element = predefFonts.getFontFace(
fontNameAsian);
if (element != null)
{
currentFonts.addFontFace((FontFaceElement) element.clone());
}
}
}
final String fontNameComplex = (String)
textProperties.getAttribute(OfficeNamespaces.STYLE_NS,
"font-name-complex");
if (fontNameComplex != null)
{
if (currentFonts.containsFont(fontNameComplex) == false)
{
final FontFaceElement element = predefFonts.getFontFace(
fontNameComplex);
if (element != null)
{
currentFonts.addFontFace((FontFaceElement) element.clone());
}