sw/qa/core/data/rtf/pass/fdo78900.rtf | 11 +++++++++++ writerfilter/source/rtftok/rtfdocumentimpl.cxx | 11 +++++++++++ 2 files changed, 22 insertions(+)
New commits: commit 21c11ffe254612ac46aa891addacb0024d5b93f0 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon May 26 15:28:31 2014 +0200 fdo#78900 RTF import: allow \dpxsize inside \dptxbxtext Previously we assumed that they always appear under \do directly. Change-Id: Ie3a978da856986f604a3815d6127abb4191323c0 diff --git a/sw/qa/core/data/rtf/pass/fdo78900.rtf b/sw/qa/core/data/rtf/pass/fdo78900.rtf new file mode 100644 index 0000000..d379735 --- /dev/null +++ b/sw/qa/core/data/rtf/pass/fdo78900.rtf @@ -0,0 +1,11 @@ +{\rtf1\ansi\ansicpg1252\deff0\deftab720 +\viewkind1\paperw11910\paperh16845\margl225\margr225\margt225\margb225\headery0\footery0 +{ +{\*\do\dobxpage\dobypage\dptxbx +{\dptxbxtext\dpx227\dpy227\dpxsize11911\dpysize9709\dplinehollow +{hello +} +} +} +\par} +} diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 42636bc..cc99fbc 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -5580,6 +5580,17 @@ int RTFDocumentImpl::popState() m_aStates.top().pCurrentBuffer->push_back( Buf_t(BUFFER_ENDSHAPE)); } + + // It's allowed to declare these inside the the shape text, and they + // are expected to have an effect for the whole shape. + if (aState.aDrawingObject.nLeft) + m_aStates.top().aDrawingObject.nLeft = aState.aDrawingObject.nLeft; + if (aState.aDrawingObject.nTop) + m_aStates.top().aDrawingObject.nTop = aState.aDrawingObject.nTop; + if (aState.aDrawingObject.nRight) + m_aStates.top().aDrawingObject.nRight = aState.aDrawingObject.nRight; + if (aState.aDrawingObject.nBottom) + m_aStates.top().aDrawingObject.nBottom = aState.aDrawingObject.nBottom; break; default: { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits