implement mathml docx import m:borderBox

This commit is contained in:
Luboš Luňák
2011-11-24 18:13:44 +01:00
parent 4ae08e816b
commit 8be68f44ce
2 changed files with 26 additions and 0 deletions

View File

@@ -83,6 +83,9 @@ OUString SmOoxmlImport::handleStream()
case OPENING( M_TOKEN( bar )):
ret += STR( " " ) + handleBar();
break;
case OPENING( M_TOKEN( borderBox )):
ret += STR( " " ) + handleBorderBox();
break;
case OPENING( M_TOKEN( f )):
ret += STR( " " ) + handleF();
break;
@@ -180,6 +183,28 @@ OUString SmOoxmlImport::handleBar()
return STR( "underline { " ) + e + STR( " }" );
}
OUString SmOoxmlImport::handleBorderBox()
{
stream.ensureOpeningTag( M_TOKEN( borderBox ));
bool isStrikeH = false;
if( stream.checkOpeningTag( M_TOKEN( borderBoxPr )))
{
if( XmlStream::Tag strikeH = stream.checkOpeningTag( M_TOKEN( strikeH )))
{
if( strikeH.attributes.attribute( M_TOKEN( val ), false ))
isStrikeH = true;
stream.ensureClosingTag( M_TOKEN( strikeH ));
}
stream.ensureClosingTag( M_TOKEN( borderBoxPr ));
}
OUString e = handleE();
stream.ensureClosingTag( M_TOKEN( borderBox ));
if( isStrikeH )
return STR( "overstrike { " ) + e + STR( " }" );
// LO does not seem to implement anything for handling the other cases
return e;
}
OUString SmOoxmlImport::handleE()
{
stream.ensureOpeningTag( M_TOKEN( e ));

View File

@@ -46,6 +46,7 @@ private:
rtl::OUString handleStream();
rtl::OUString handleAcc();
rtl::OUString handleBar();
rtl::OUString handleBorderBox();
rtl::OUString handleE();
rtl::OUString handleF();
rtl::OUString handleR();