Kaydet (Commit) c2e2ca29 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#49892 import RTF_SHPB{X,Y}PAGE

Change-Id: I8fe2b28f44ee61fc0f1438de3681fd86b16d29ae
üst ecda5ead
...@@ -2318,6 +2318,12 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) ...@@ -2318,6 +2318,12 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_FACINGP: case RTF_FACINGP:
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_evenAndOddHeaders, RTFValue::Pointer_t(new RTFValue(1))); m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_evenAndOddHeaders, RTFValue::Pointer_t(new RTFValue(1)));
break; 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: default:
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle flag '" << lcl_RtfToString(nKeyword) << "'"); SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
aSkip.setParsed(false); aSkip.setParsed(false);
...@@ -3989,6 +3995,16 @@ RTFPicture::RTFPicture() ...@@ -3989,6 +3995,16 @@ RTFPicture::RTFPicture()
{ {
} }
RTFShape::RTFShape()
: nLeft(0),
nTop(0),
nRight(0),
nBottom(0),
nHoriOrientRelation(0),
nVertOrientRelation(0)
{
}
RTFDrawingObject::RTFDrawingObject() RTFDrawingObject::RTFDrawingObject()
: nLineColorR(0), : nLineColorR(0),
nLineColorG(0), nLineColorG(0),
......
...@@ -249,11 +249,14 @@ namespace writerfilter { ...@@ -249,11 +249,14 @@ namespace writerfilter {
class RTFShape class RTFShape
{ {
public: public:
RTFShape();
std::vector< std::pair<rtl::OUString, rtl::OUString> > aProperties; std::vector< std::pair<rtl::OUString, rtl::OUString> > aProperties;
int nLeft; int nLeft;
int nTop; int nTop;
int nRight; int nRight;
int nBottom; int nBottom;
sal_Int16 nHoriOrientRelation;
sal_Int16 nVertOrientRelation;
}; };
/// Stores the properties of a drawing object. /// Stores the properties of a drawing object.
......
...@@ -338,6 +338,10 @@ void RTFSdrImport::resolve(RTFShape& rShape) ...@@ -338,6 +338,10 @@ void RTFSdrImport::resolve(RTFShape& rShape)
{ {
xShape->setPosition(awt::Point(rShape.nLeft, rShape.nTop)); xShape->setPosition(awt::Point(rShape.nLeft, rShape.nTop));
xShape->setSize(awt::Size(rShape.nRight - rShape.nLeft, rShape.nBottom - 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 // Send it to dmapper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment