diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-20 13:22:33 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-21 09:28:25 +0100 |
commit | 756d0b1dff3cb5c3cab10c1f14e4dae6ac3ba135 (patch) | |
tree | 8594ab1ace7a551f5bfc5b1a4e04f03c7aa52118 /oox | |
parent | 191f648ffd97b58f57afca65961e5dbcc2bbe724 (diff) |
drawingML import: run fonts inside group shape
Change-Id: Ib54fe868c11c0c22b85d8821fa7274c80918362c
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textcharacterpropertiescontext.cxx | 12 | ||||
-rw-r--r-- | oox/source/drawingml/textfont.cxx | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 36bd255455df..8b6156ec64fb 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -132,6 +132,18 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink return new HyperLinkContext( *this, rAttribs, mrTextCharacterProperties.maHyperlinkPropertyMap ); case OOX_TOKEN( doc, rFonts ): + if( rAttribs.hasAttribute(OOX_TOKEN(doc, ascii)) ) + { + mrTextCharacterProperties.maLatinFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, ascii), OUString())); + } + if( rAttribs.hasAttribute(OOX_TOKEN(doc, cs)) ) + { + mrTextCharacterProperties.maComplexFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, cs), OUString())); + } + if( rAttribs.hasAttribute(OOX_TOKEN(doc, eastAsia)) ) + { + mrTextCharacterProperties.maAsianFont.setAttributes(rAttribs.getString(OOX_TOKEN(doc, eastAsia), OUString())); + } break; case OOX_TOKEN( doc, b ): mrTextCharacterProperties.moBold = rAttribs.getBool(OOX_TOKEN( doc, val ), true); diff --git a/oox/source/drawingml/textfont.cxx b/oox/source/drawingml/textfont.cxx index 553f5aef9eff..239c08768a2f 100644 --- a/oox/source/drawingml/textfont.cxx +++ b/oox/source/drawingml/textfont.cxx @@ -65,6 +65,14 @@ void TextFont::setAttributes( const AttributeList& rAttribs ) mnCharset = rAttribs.getInteger( XML_charset, WINDOWS_CHARSET_DEFAULT ); } +void TextFont::setAttributes( const OUString& sFontName ) +{ + maTypeface = sFontName; + maPanose = OUString(); + mnPitch = 0; + mnCharset = WINDOWS_CHARSET_DEFAULT; +} + void TextFont::assignIfUsed( const TextFont& rTextFont ) { if( !rTextFont.maTypeface.isEmpty() ) |