summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2016-10-29 15:49:18 +0000
committerTamás Zolnai <tamas.zolnai@collabora.com>2016-10-29 16:43:27 +0000
commit24e522f723569b53d9a830166b3825292bcd7527 (patch)
tree70e0de676d70739b45fcf6ba9a5428952b28f633 /writerfilter
parentf351b3624de79b5806a066202a3a0d6fa59c8469 (diff)
tdf#103753: DOCX: Handle relative positions to left or right margin
Positioning relative to left or right margin in MS Word works the same as the positioning relative to left or right page border in LO Writer. Change-Id: I476a5e9e76f766b7fb7f1c7f4a068af8bb3c8813 Reviewed-on: https://gerrit.libreoffice.org/30376 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 0dccda708970..8c4dd9c5aed8 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -94,7 +94,9 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal )
NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_margin,
NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_page,
NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_column,
- NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_character
+ NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_character,
+ NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_leftMargin,
+ NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_rightMargin
};
static const sal_Int16 pHoriRelations[] =
@@ -103,9 +105,11 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal )
text::RelOrientation::PAGE_FRAME,
text::RelOrientation::FRAME,
text::RelOrientation::CHAR,
+ text::RelOrientation::PAGE_LEFT,
+ text::RelOrientation::PAGE_RIGHT,
};
- for ( int i = 0; i < 4; i++ )
+ for ( int i = 0; i < 6; i++ )
{
if ( pHoriRelValues[i] == sal_uInt32( nIntValue ) )
m_nRelation = pHoriRelations[i];