summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-11-06 10:53:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-11-06 13:46:34 +0000
commit99324a9dc5b2963be31ebb7a78679c2f3ed3d7a9 (patch)
treed885eba8b7e935015db74298cf54aece39cc7a32
parente68fe11ffa5b4cbcc194fae59350b64200256d01 (diff)
fdo#48442 fix default hori/vert frame anchor during RTF import
We used to send nothing when we got nothing, but this is not correct: \pvmrg and \phmrg is the default in RTF, but not in Writer. (cherry picked from commit 7b7bee4ed5722ce59ffd3394a0330d71d69d66b3) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I9f69e282e68f0828c8b5ba98657cad1dd0715eb3 Reviewed-on: https://gerrit.libreoffice.org/993 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index bf981d901b87..dbaa6e5fc0ca 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3942,12 +3942,14 @@ RTFSprms RTFFrame::getSprms()
pValue.reset(new RTFValue(nVertPadding));
break;
case NS_ooxml::LN_CT_FramePr_hAnchor:
- if ( nHoriAnchor != 0 )
- pValue.reset(new RTFValue(nHoriAnchor));
+ if ( nHoriAnchor == 0 )
+ nHoriAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_margin;
+ pValue.reset(new RTFValue(nHoriAnchor));
break;
case NS_ooxml::LN_CT_FramePr_vAnchor:
- if ( nVertAnchor != 0 )
- pValue.reset(new RTFValue(nVertAnchor));
+ if ( nVertAnchor == 0 )
+ nVertAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_margin;
+ pValue.reset(new RTFValue(nVertAnchor));
break;
case NS_ooxml::LN_CT_FramePr_xAlign:
pValue.reset(new RTFValue(nHoriAlign));