diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-01 20:30:40 +0200 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-08-02 15:54:04 +0100 |
commit | 5ea5a0ff387d22e10b7565eec7f0f4abc685dda7 (patch) | |
tree | 22b40597bfcca8edb9c3dba56ad5e54aa6077b57 | |
parent | 78b0de49c342402648b71ba59e91b03a7e7cc38e (diff) |
fdo#49892 import RTF_SHPB{X,Y}PAGE
(cherry picked from commit 2111c6e6dc18f3ffd11de176791ecc04bab41afb)
Conflicts:
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Change-Id: I8fe2b28f44ee61fc0f1438de3681fd86b16d29ae
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index a59c06db0b8f..2074d69731ff 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2207,6 +2207,12 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_LANDSCAPE: lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_orient, RTFValue::Pointer_t(new RTFValue(1))); 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: SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle flag '" << lcl_RtfToString(nKeyword) << "'"); aSkip.setParsed(false); @@ -3734,6 +3740,16 @@ RTFPicture::RTFPicture() { } +RTFShape::RTFShape() + : nLeft(0), + nTop(0), + nRight(0), + nBottom(0), + nHoriOrientRelation(0), + nVertOrientRelation(0) +{ +} + RTFDrawingObject::RTFDrawingObject() : nLineColorR(0), nLineColorG(0), diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 9778ce72bd1e..c43ca2946621 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -190,11 +190,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 f12e44ce2fa7..701780d288a1 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("HoriOrientRelation", uno::makeAny(rShape.nHoriOrientRelation)); + if (rShape.nVertOrientRelation != 0) + xPropertySet->setPropertyValue("VertOrientRelation", uno::makeAny(rShape.nVertOrientRelation)); } // Send it to dmapper |