Kaydet (Commit) dff36f4c authored tarafından Luboš Luňák's avatar Luboš Luňák

docx m:r can contain multiple m:t

üst 34e2e7dd
...@@ -370,13 +370,26 @@ OUString SmOoxmlImport::handleR() ...@@ -370,13 +370,26 @@ OUString SmOoxmlImport::handleR()
// stream.ensureClosingTag( OOX_TOKEN( doc, rFonts )); // stream.ensureClosingTag( OOX_TOKEN( doc, rFonts ));
stream.ensureClosingTag( OOX_TOKEN( doc, rPr )); stream.ensureClosingTag( OOX_TOKEN( doc, rPr ));
} }
// TODO can there be more t's ? OUString text;
XmlStream::Tag rtag = stream.ensureOpeningTag( M_TOKEN( t )); while( stream.currentToken() != CLOSING( stream.currentToken()))
// TODO bail out if failure? {
OUString text = rtag.text; switch( stream.currentToken())
if( rtag.attribute( OOX_TOKEN( xml, space )) != STR( "preserve" )) {
text = text.trim(); case OPENING( M_TOKEN( t )):
stream.ensureClosingTag( M_TOKEN( t )); {
XmlStream::Tag rtag = stream.ensureOpeningTag( M_TOKEN( t ));
if( rtag.attribute( OOX_TOKEN( xml, space )) != STR( "preserve" ))
text += rtag.text.trim();
else
text += rtag.text;
stream.ensureClosingTag( M_TOKEN( t ));
break;
}
default:
stream.handleUnexpectedTag();
break;
}
}
stream.ensureClosingTag( M_TOKEN( r )); stream.ensureClosingTag( M_TOKEN( r ));
return text; return text;
} }
......
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