Kaydet (Commit) fb2875a2 authored tarafından Luboš Luňák's avatar Luboš Luňák Kaydeden (comit) Fridrich Strba

m:nor and m:lit math docx tags lead to quoting

The meaning should not be exactly the same, but it looks like there's
no better way to express this (or rather quoting means both).

Change-Id: I024ce6c89667a69f685bb84d768095100b0090b1
Reviewed-on: https://gerrit.libreoffice.org/3060Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst 40c5c459
......@@ -570,11 +570,21 @@ OUString SmOoxmlImport::handleNary()
OUString SmOoxmlImport::handleR()
{
stream.ensureOpeningTag( M_TOKEN( r ));
if( XmlStream::Tag rPr = stream.checkOpeningTag( OOX_TOKEN( doc, rPr )))
{ // TODO
// stream.checkOpeningTag( OOX_TOKEN( doc, rFonts ));
// stream.ensureClosingTag( OOX_TOKEN( doc, rFonts ));
stream.ensureClosingTag( OOX_TOKEN( doc, rPr ));
bool normal = false;
bool literal = false;
if( XmlStream::Tag rPr = stream.checkOpeningTag( M_TOKEN( rPr )))
{
if( XmlStream::Tag litTag = stream.checkOpeningTag( M_TOKEN( lit )))
{
literal = litTag.attribute( M_TOKEN( val ), true );
stream.ensureClosingTag( M_TOKEN( lit ));
}
if( XmlStream::Tag norTag = stream.checkOpeningTag( M_TOKEN( nor )))
{
normal = norTag.attribute( M_TOKEN( val ), true );
stream.ensureClosingTag( M_TOKEN( nor ));
}
stream.ensureClosingTag( M_TOKEN( rPr ));
}
OUString text;
while( !stream.atEnd() && stream.currentToken() != CLOSING( stream.currentToken()))
......@@ -597,6 +607,8 @@ OUString SmOoxmlImport::handleR()
}
}
stream.ensureClosingTag( M_TOKEN( r ));
if( normal || literal )
text = "\"" + text + "\"";
return text.replaceAll("{", "\\{").replaceAll("}", "\\}");
}
......
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