diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-17 16:12:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-17 16:37:40 +0200 |
commit | 845e8478ba575c695d4f0abbd7977b41317d92e6 (patch) | |
tree | 6426eb4e299608160a098e5553f942b3731602b6 /writerfilter/source | |
parent | Remove the unneeded "scalable font" icon from the font combobox. (diff) | |
download | core-845e8478ba575c695d4f0abbd7977b41317d92e6.tar.gz core-845e8478ba575c695d4f0abbd7977b41317d92e6.zip |
import RTF_DODHGT
Change-Id: I6e97c33569e46171ed702b573d42ced805cded78
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 7 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 16 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.hxx | 1 |
4 files changed, 17 insertions, 8 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 192cb3b2e988..a93fc3149f92 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2310,6 +2310,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) std::vector<beans::PropertyValue>& rPendingProperties = m_aStates.top().aDrawingObject.aPendingProperties; for (std::vector<beans::PropertyValue>::iterator i = rPendingProperties.begin(); i != rPendingProperties.end(); ++i) m_aStates.top().aDrawingObject.xPropertySet->setPropertyValue(i->Name, i->Value); + m_pSdrImport->resolveDhgt(m_aStates.top().aDrawingObject.xPropertySet, m_aStates.top().aDrawingObject.nDhgt); } break; case RTF_DOBXMARGIN: @@ -3136,6 +3137,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) lcl_putNestedAttribute(m_aStates.top().aTableCellSprms, NS_ooxml::LN_CT_TcPrBase_shd, NS_ooxml::LN_CT_Shd_val, RTFValue::Pointer_t(new RTFValue(nValue))); } break; + case RTF_DODHGT: + m_aStates.top().aDrawingObject.nDhgt = nParam; + break; default: SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle value '" << lcl_RtfToString(nKeyword) << "'"); aSkip.setParsed(false); @@ -4122,7 +4126,8 @@ RTFDrawingObject::RTFDrawingObject() nFillColorR(0), nFillColorG(0), nFillColorB(0), - bHasFillColor(false) + bHasFillColor(false), + nDhgt(0) { } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 7a0319a14114..e2a5cde4904e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -272,6 +272,7 @@ namespace writerfilter { bool bHasLineColor; sal_uInt8 nFillColorR, nFillColorG, nFillColorB; bool bHasFillColor; + sal_Int32 nDhgt; }; /// Stores the properties of a picture. diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 680845f7efbc..0471de6e469e 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -71,6 +71,14 @@ void RTFSdrImport::createShape(OUString aStr, uno::Reference<drawing::XShape>& x xPropertySet.set(xShape, uno::UNO_QUERY); } +void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nZOrder) +{ + writerfilter::dmapper::DomainMapper& rMapper = (writerfilter::dmapper::DomainMapper&)m_rImport.Mapper(); + writerfilter::dmapper::GraphicZOrderHelper* pHelper = rMapper.graphicZOrderHelper(); + xPropertySet->setPropertyValue("ZOrder", uno::makeAny(pHelper->findZOrder(nZOrder))); + pHelper->addItem(xPropertySet, nZOrder); +} + void RTFSdrImport::resolve(RTFShape& rShape) { int nType = -1; @@ -281,13 +289,7 @@ void RTFSdrImport::resolve(RTFShape& rShape) else if ( i->first == "geoBottom" ) aViewBox.Height = i->second.toInt32(); else if ( i->first == "dhgt" ) - { - writerfilter::dmapper::DomainMapper& rMapper = (writerfilter::dmapper::DomainMapper&)m_rImport.Mapper(); - writerfilter::dmapper::GraphicZOrderHelper* pHelper = rMapper.graphicZOrderHelper(); - sal_Int32 nZOrder = i->second.toInt32(); - xPropertySet->setPropertyValue("ZOrder", uno::makeAny(pHelper->findZOrder(nZOrder))); - pHelper->addItem(xPropertySet, nZOrder); - } + resolveDhgt(xPropertySet, i->second.toInt32()); else SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle shape property '" << OUStringToOString( i->first, RTL_TEXTENCODING_UTF8 ).getStr() << "':'" << diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx index e99445db8f5f..517b56b00c6a 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.hxx +++ b/writerfilter/source/rtftok/rtfsdrimport.hxx @@ -40,6 +40,7 @@ namespace writerfilter { virtual ~RTFSdrImport(); void resolve(RTFShape& rShape); + void resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nZOrder); private: void createShape(rtl::OUString aService, uno::Reference<drawing::XShape>& xShape, uno::Reference<beans::XPropertySet>& xPropertySet); |