summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-08-01 20:30:40 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-08-02 09:21:25 +0200
commitc2e2ca29ccc8efe1957ac770c6b818c56a37d532 (patch)
treec31b625c26af9cc63b8376320a2b6a856edec89f
parentecda5eadaf497f8eb1ec8fb7e73c4e5e6d717da9 (diff)
fdo#49892 import RTF_SHPB{X,Y}PAGE
Change-Id: I8fe2b28f44ee61fc0f1438de3681fd86b16d29ae
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx16
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx3
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx4
3 files changed, 23 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index e6758f1f9610..1e6761609fc0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2318,6 +2318,12 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_FACINGP:
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_evenAndOddHeaders, 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);
@@ -3989,6 +3995,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 1de7c6e36c39..c05a0f51ad53 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -249,11 +249,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 f5b755587b60..2f765eca86dc 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -338,6 +338,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