summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-03-06 15:57:22 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-03-06 16:31:12 +0100
commit1eaab77c718ffa254068ae6032862dfb5a03db67 (patch)
tree2cab2a5f831f19c21382afef2b9cbd66c33f5f71 /writerfilter
parentcf2a1277acd4a29492f056a626b13e903d391027 (diff)
fdo#60722 import RTF_SHPZ
Change-Id: I6c572d44d93f812d50376ec05ae94bdabadb3f1e
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx3
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx3
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx2
4 files changed, 9 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 4d190e54a912..4564f3aede14 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -251,7 +251,8 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight )
while( it != items.end())
{
// std::map is iterated sorted by key
- if( it->first > relativeHeight )
+ // if there is an item that has the same z-order, we belong under it
+ if( it->first >= relativeHeight )
break; // this is the first one higher, we belong right before it
else
++it;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 0e05b755c1b9..eda06d317dcc 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3187,6 +3187,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_SHPBOTTOM:
m_aStates.top().aShape.nBottom = TWIP_TO_MM100(nParam);
break;
+ case RTF_SHPZ:
+ m_aStates.top().aShape.oZ.reset(nParam);
+ break;
case RTF_FFTYPE:
switch (nParam)
{
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index c7affd7fe032..5ced0196b916 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -31,6 +31,7 @@
#include <stack>
#include <queue>
+#include <boost/optional.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -259,6 +260,7 @@ namespace writerfilter {
sal_Int32 nTop;
sal_Int32 nRight;
sal_Int32 nBottom;
+ boost::optional<sal_Int32> oZ; ///< Z-Order of the shape.
sal_Int16 nHoriOrientRelation;
sal_Int16 nVertOrientRelation;
int nWrap;
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 5744d97bbc87..864a8bda7962 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -298,6 +298,8 @@ void RTFSdrImport::resolve(RTFShape& rShape)
{
xPropertySet->setPropertyValue("LineColor", aLineColor);
xPropertySet->setPropertyValue("LineWidth", aLineWidth);
+ if (rShape.oZ)
+ resolveDhgt(xPropertySet, *rShape.oZ);
}
if (nType == ESCHER_ShpInst_PictureFrame) // picture frame