diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-18 09:09:03 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-18 09:09:03 +0200 |
commit | fc8f76395dce902b6599cdfc471b0074919c4fa4 (patch) | |
tree | 87c393d5845cf88ab1152c8eae51452c6ef43426 /writerfilter/source | |
parent | embeddedobj: add README (diff) | |
download | core-fc8f76395dce902b6599cdfc471b0074919c4fa4.tar.gz core-fc8f76395dce902b6599cdfc471b0074919c4fa4.zip |
import RTF_DPLINEHOLLOW
Change-Id: I580bc2cb38b7fe4b42cfbd78672fc5b8d1d01398
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.hxx | 1 |
4 files changed, 16 insertions, 8 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index a93fc3149f92..d5fd0848a03b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2381,6 +2381,9 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_SHPBYPAGE: m_aStates.top().aShape.nVertOrientRelation = text::RelOrientation::PAGE_FRAME; break; + case RTF_DPLINEHOLLOW: + m_aStates.top().aDrawingObject.nFLine = 0; + break; default: SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle flag '" << lcl_RtfToString(nKeyword) << "'"); aSkip.setParsed(false); @@ -3684,6 +3687,8 @@ int RTFDocumentImpl::popState() // If there is no fill, the Word default is 100% transparency. xPropertySet->setPropertyValue("FillTransparence", uno::makeAny(sal_Int32(100))); + m_pSdrImport->resolveFLine(xPropertySet, rDrawing.nFLine); + Mapper().startShape(xShape); replayShapetext(); Mapper().endShape(); @@ -4127,7 +4132,8 @@ RTFDrawingObject::RTFDrawingObject() nFillColorG(0), nFillColorB(0), bHasFillColor(false), - nDhgt(0) + nDhgt(0), + nFLine(-1) { } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index e2a5cde4904e..7f0988c20263 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -273,6 +273,7 @@ namespace writerfilter { sal_uInt8 nFillColorR, nFillColorG, nFillColorB; bool bHasFillColor; sal_Int32 nDhgt; + sal_Int32 nFLine; }; /// Stores the properties of a picture. diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 0471de6e469e..3e74080ca43e 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -79,6 +79,12 @@ void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, pHelper->addItem(xPropertySet, nZOrder); } +void RTFSdrImport::resolveFLine(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nFLine) +{ + if (nFLine == 0) + xPropertySet->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE)); +} + void RTFSdrImport::resolve(RTFShape& rShape) { int nType = -1; @@ -147,13 +153,7 @@ void RTFSdrImport::resolve(RTFShape& rShape) } } else if (i->first == "fLine" && xPropertySet.is()) - { - if (i->second.toInt32() == 0) - { - aAny <<= drawing::LineStyle_NONE; - xPropertySet->setPropertyValue("LineStyle", aAny); - } - } + resolveFLine(xPropertySet, i->second.toInt32()); else if (i->first == "fillOpacity" && xPropertySet.is()) { int opacity = 100 - (i->second.toInt32())*100/65536; diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx index 517b56b00c6a..0924124bdb06 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.hxx +++ b/writerfilter/source/rtftok/rtfsdrimport.hxx @@ -41,6 +41,7 @@ namespace writerfilter { void resolve(RTFShape& rShape); void resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nZOrder); + void resolveFLine(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nFLine); private: void createShape(rtl::OUString aService, uno::Reference<drawing::XShape>& xShape, uno::Reference<beans::XPropertySet>& xPropertySet); |