implement RTF_FLYANCHOR

This commit is contained in:
Miklos Vajna 2011-08-18 01:54:39 +02:00
parent e4c1f2a7ab
commit d8ceaa2fb5
4 changed files with 8 additions and 1 deletions

View file

@ -1847,6 +1847,7 @@ RTFSymbol aRTFControlWords[] = {
{"flymaincnt", CONTROL_DESTINATION, RTF_FLYMAINCNT},
{"flyvert", CONTROL_VALUE, RTF_FLYVERT},
{"flyhorz", CONTROL_VALUE, RTF_FLYHORZ},
{"flyanchor", CONTROL_VALUE, RTF_FLYANCHOR},
};
int nRTFControlWords = SAL_N_ELEMENTS(aRTFControlWords);

View file

@ -1846,7 +1846,8 @@ enum RTFKeyword
RTF_ZWNJ,
RTF_FLYMAINCNT,
RTF_FLYVERT,
RTF_FLYHORZ
RTF_FLYHORZ,
RTF_FLYANCHOR
};
/// Types of an RTF Control Word

View file

@ -725,6 +725,7 @@ void RTFDocumentImpl::checkChangedFrame()
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SizeType")), uno::Any(text::SizeType::MIN));
xShape->setSize(awt::Size(m_aStates.top().aFrame.nW, m_aStates.top().aFrame.nH));
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), uno::Any(m_aStates.top().aFrame.nAnchorType));
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")), uno::Any(m_aStates.top().aFrame.nHoriOrient));
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientRelation")), uno::Any(m_aStates.top().aFrame.nHoriOrientRelation));
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), uno::Any(sal_Int32(m_aStates.top().aFrame.nX)));
@ -2434,6 +2435,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_aStates.top().aFrame.nHoriOrientRelation = aHoriOrient.GetRelation();
}
break;
case RTF_FLYANCHOR:
m_aStates.top().aFrame.nAnchorType = nParam;
break;
default:
#if OSL_DEBUG_LEVEL > 1
OSL_TRACE("%s: TODO handle value '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));

View file

@ -195,6 +195,7 @@ namespace writerfilter {
sal_Int32 nX, nY, nW, nH;
sal_Int32 nLeftMargin, nRightMargin, nTopMargin, nBottomMargin;
sal_Int16 nHoriOrient, nHoriOrientRelation, nVertOrient, nVertOrientRelation;
sal_Int16 nAnchorType;
};
/// State of the parser, which gets saved / restored when changing groups.