summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-11-24 18:13:44 +0100
committerLuboš Luňák <l.lunak@suse.cz>2011-11-24 18:44:01 +0100
commit8be68f44ce8298e7309d4872fb483480355b85e6 (patch)
tree6edd8cc9380d3b8748269f8e911c26ba9ef52149 /starmath
parent4ae08e816b9bf8e27290f54ccd051346b854bfaf (diff)
implement mathml docx import m:borderBox
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/ooxmlimport.cxx25
-rw-r--r--starmath/source/ooxmlimport.hxx1
2 files changed, 26 insertions, 0 deletions
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index ac7d520d32d6..a3b3648bd02d 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -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 ));
diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx
index 508723c4c8be..8d587f7fe69b 100644
--- a/starmath/source/ooxmlimport.hxx
+++ b/starmath/source/ooxmlimport.hxx
@@ -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();