writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 ++++++++++++++++ writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 +++ writerfilter/source/rtftok/rtfsdrimport.cxx | 4 ++++ 3 files changed, 23 insertions(+)
New commits: commit def0f0c580df3155e98a54422efe5fb7578be485 Author: Miklos Vajna <[email protected]> Date: Wed Aug 1 20:30:40 2012 +0200 fdo#49892 import RTF_SHPB{X,Y}PAGE (cherry picked from commit 2111c6e6dc18f3ffd11de176791ecc04bab41afb) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I8fe2b28f44ee61fc0f1438de3681fd86b16d29ae diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index af2d592..8e34ad3 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2222,6 +2222,12 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) m_aStates.top().aTableSprms->push_back(make_pair(NS_rtf::LN_NFC, RTFValue::Pointer_t(new RTFValue(23)))); // bullets, same as \levelnfc23 } break; + case RTF_SHPBXPAGE: + m_aStates.top().aShape.nHoriOrientRelation = text::RelOrientation::PAGE_FRAME; + break; + case RTF_SHPBYPAGE: + m_aStates.top().aShape.nVertOrientRelation = text::RelOrientation::PAGE_FRAME; + break; default: #if OSL_DEBUG_LEVEL > 1 OSL_TRACE("%s: TODO handle flag '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword)); @@ -3756,6 +3762,16 @@ RTFPicture::RTFPicture() { } +RTFShape::RTFShape() + : nLeft(0), + nTop(0), + nRight(0), + nBottom(0), + nHoriOrientRelation(0), + nVertOrientRelation(0) +{ +} + RTFFrame::RTFFrame(RTFParserState* pParserState) : m_pParserState(pParserState), nX(0), diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index d42a401..4efea1d 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -191,11 +191,14 @@ namespace writerfilter { class RTFShape { public: + RTFShape(); std::vector< std::pair<rtl::OUString, rtl::OUString> > aProperties; int nLeft; int nTop; int nRight; int nBottom; + sal_Int16 nHoriOrientRelation; + sal_Int16 nVertOrientRelation; }; /// Stores the properties of a drawing object. diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index e89a8c7..1c2921c 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -321,6 +321,10 @@ void RTFSdrImport::resolve(RTFShape& rShape) { xShape->setPosition(awt::Point(rShape.nLeft, rShape.nTop)); xShape->setSize(awt::Size(rShape.nRight - rShape.nLeft, rShape.nBottom - rShape.nTop)); + if (rShape.nHoriOrientRelation != 0) + xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientRelation")), uno::makeAny(rShape.nHoriOrientRelation)); + if (rShape.nVertOrientRelation != 0) + xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientRelation")), uno::makeAny(rShape.nVertOrientRelation)); } // Send it to dmapper _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
