oox/source/export/drawingml.cxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
New commits: commit 4688a4d4fb74cab711ab19743a6783d925626eb1 Author: Katarina Behrens <bu...@bubli.org> Date: Thu Apr 10 22:43:38 2014 +0200 fdo#65277: Export text run strikeout property Change-Id: Id5bd7649a8ffaaf03099bfeab42ea4456ef718ec Reviewed-on: https://gerrit.libreoffice.org/8925 Tested-by: David Tardon <dtar...@redhat.com> Reviewed-by: David Tardon <dtar...@redhat.com> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index c41d0bd..a99430a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/awt/CharSet.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/awt/FontSlant.hpp> +#include <com/sun/star/awt/FontStrikeout.hpp> #include <com/sun/star/awt/FontWeight.hpp> #include <com/sun/star/awt/FontUnderline.hpp> #include <com/sun/star/awt/Gradient.hpp> @@ -1058,6 +1059,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel const char* bold = NULL; const char* italic = NULL; const char* underline = NULL; + const char* strikeout = NULL; sal_Int32 nSize = 1800; sal_Int32 nCharEscapement = 0; @@ -1132,6 +1134,32 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel break; } + if ( GETAD( CharStrikeout ) ) + { + switch ( *((sal_Int16*) mAny.getValue()) ) + { + case awt::FontStrikeout::NONE : + strikeout = "noStrike"; + break; + case awt::FontStrikeout::SINGLE : + // LibO supports further values of character + // strikeout, OOXML standard (20.1.10.78, + // ST_TextStrikeType) however specifies only + // 3 - single, double and none. Approximate + // the remaining ones by single strike (better + // some strike than none at all). + // TODO: figure out how to do this better + case awt::FontStrikeout::BOLD : + case awt::FontStrikeout::SLASH : + case awt::FontStrikeout::X : + strikeout = "sngStrike"; + break; + case awt::FontStrikeout::DOUBLE : + strikeout = "dblStrike"; + break; + } + } + if( GETA( CharLocale ) ) { com::sun::star::lang::Locale aLocale; mAny >>= aLocale; @@ -1156,6 +1184,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel XML_i, italic, XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ), XML_sz, nSize == 1800 ? NULL : IS( nSize ), + XML_strike, strikeout, XML_u, underline, XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ), FSEND ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits