summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-02-19 11:50:12 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-19 11:54:38 +0100
commit793c1b17abebd2485555a9c35580fe3fb4fc9230 (patch)
tree6f6777380d4b81b045359884abafb1bea8fca1b3 /writerfilter
parentb23887e901706814e2c046d8ccd10549d6892554 (diff)
writerfilter: get rid of these hardcoded values
Change-Id: I381266cbc9eb2a6d95b7bdc5e80a1e486112dbbe
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 52fbd0ccb749..bdfe89646cbc 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: