summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-06-14 18:04:55 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-15 10:45:12 +0200
commit98f90fdecc030b3789c0811cff8603709e5fec30 (patch)
tree2d457f6f3b8d6aa673674196aab3acb25e448341 /oox
parentfdo#58819 VML export of ESCHER_Prop_fNoLineDrawDash (diff)
downloadcore-98f90fdecc030b3789c0811cff8603709e5fec30.tar.gz
core-98f90fdecc030b3789c0811cff8603709e5fec30.zip
fdo#58819 VML export of ESCHER_Prop_gtextFont
Change-Id: Id0404405b41d5137e726670a959d5e314eb8f2ec
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/vmlexport.cxx42
1 files changed, 30 insertions, 12 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index f37bdf8c9486..325f87e2dbfe 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -708,23 +708,41 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
}
break;
case ESCHER_Prop_gtextUNICODE:
+ case ESCHER_Prop_gtextFont:
{
- SvMemoryStream aStream;
- aStream.Write(it->pBuf, it->nPropSize);
- aStream.Seek(0);
- OUString aTextPathString = SvxMSDffManager::MSDFFReadZString(aStream, it->nPropSize, true);
+ EscherPropSortStruct aUnicode;
+ if (rProps.GetOpt(ESCHER_Prop_gtextUNICODE, aUnicode))
+ {
+ SvMemoryStream aStream;
+ aStream.Write(it->pBuf, it->nPropSize);
+ aStream.Seek(0);
+ OUString aTextPathString = SvxMSDffManager::MSDFFReadZString(aStream, it->nPropSize, true);
+ aStream.Seek(0);
- m_pSerializer->singleElementNS( XML_v, XML_path,
- XML_textpathok, "t",
- FSEND );
+ m_pSerializer->singleElementNS( XML_v, XML_path,
+ XML_textpathok, "t",
+ FSEND );
- m_pSerializer->singleElementNS( XML_v, XML_textpath,
- XML_on, "t",
- XML_fitshape, "t",
- XML_string, OUStringToOString(aTextPathString, RTL_TEXTENCODING_UTF8),
- FSEND );
+ sax_fastparser::FastAttributeList* pAttrList = m_pSerializer->createAttrList();
+ pAttrList->add(XML_on, "t");
+ pAttrList->add(XML_fitshape, "t");
+ pAttrList->add(XML_string, OUStringToOString(aTextPathString, RTL_TEXTENCODING_UTF8));
+ EscherPropSortStruct aFont;
+ OUString aStyle;
+ if (rProps.GetOpt(ESCHER_Prop_gtextFont, aFont))
+ {
+ aStream.Write(aFont.pBuf, aFont.nPropSize);
+ aStream.Seek(0);
+ OUString aTextPathFont = SvxMSDffManager::MSDFFReadZString(aStream, aFont.nPropSize, true);
+ aStyle += "font-family:\"" + aTextPathFont + "\"";
+ }
+ if (!aStyle.isEmpty())
+ pAttrList->add(XML_style, OUStringToOString(aStyle, RTL_TEXTENCODING_UTF8));
+ m_pSerializer->singleElementNS(XML_v, XML_textpath, XFastAttributeListRef(pAttrList));
+ }
bAlreadyWritten[ESCHER_Prop_gtextUNICODE] = true;
+ bAlreadyWritten[ESCHER_Prop_gtextFont] = true;
}
break;
case ESCHER_Prop_Rotation: