writerfilter/source/dmapper/DomainMapperTableManager.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 793c1b17abebd2485555a9c35580fe3fb4fc9230 Author: Miklos Vajna <vmik...@suse.cz> Date: Tue Feb 19 11:50:12 2013 +0100 writerfilter: get rid of these hardcoded values Change-Id: I381266cbc9eb2a6d95b7bdc5e80a1e486112dbbe diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 52fbd0c..bdfe896 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/text/SizeType.hpp> #include <com/sun/star/text/TableColumnSeparator.hpp> #include <com/sun/star/text/VertOrientation.hpp> +#include <com/sun/star/text/WritingMode2.hpp> #include <ooxml/resourceids.hxx> #include <doctok/sprmids.hxx> #include <dmapperLoggers.hxx> @@ -251,28 +252,26 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_TcPrBase_textDirection: { TablePropertyMapPtr pPropMap( new TablePropertyMap ); - const sal_Int16 HORI_LEFT_TOP = 0; - const sal_Int16 VERT_TOP_RIGHT = 2; bool bInsertCellProps = true; switch ( nIntValue ) { case 1: // tbRl // Binary filter takes BiDirection into account ( but I have no idea about that here ) // or even what it is. But... here's where to handle it if it becomes an issue - pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT )); + pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( text::WritingMode2::TB_RL )); SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue ); break; case 3: // btLr // We have to fake this text direction - pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP )); + pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( text::WritingMode2::LR_TB )); pPropMap->Insert( PROP_CHAR_ROTATION, false, uno::makeAny( sal_Int16( 900 ) )); SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue ); break; case 4: // lrTbV - pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP )); + pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( text::WritingMode2::LR_TB )); break; case 5: // tbRlV - pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT )); + pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( text::WritingMode2::TB_RL )); break; case 0: // lrTb case NS_ooxml::LN_Value_ST_TextDirection_tbLrV: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits