From 0a5f10879fe60d9f531e84d9eb802740b26491dd Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 8 Jul 2011 15:03:00 +0200 Subject: [PATCH] avoid hardwired size for path properties --- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index e74d5a5cd04c..b94276bebe34 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2452,6 +2452,7 @@ void RTFDocumentImpl::resolveShapeProperties(std::vector< std::pair aCoordinates; uno::Sequence aSegments; awt::Rectangle aViewBox; @@ -2643,13 +2644,20 @@ void RTFDocumentImpl::resolveShapeProperties(std::vector< std::pair aPathPropSeq(2); + std::vector aPathPropVec; - aPathPropSeq[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Coordinates")); - aPathPropSeq[0].Value <<= aCoordinates; + aPropertyValue.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Coordinates")); + aPropertyValue.Value <<= aCoordinates; + aPathPropVec.push_back(aPropertyValue); - aPathPropSeq[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Segments")); - aPathPropSeq[1].Value <<= aSegments; + aPropertyValue.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Segments")); + aPropertyValue.Value <<= aSegments; + aPathPropVec.push_back(aPropertyValue); + + uno::Sequence aPathPropSeq(aPathPropVec.size()); + beans::PropertyValue* pPathValues = aPathPropSeq.getArray(); + for (std::vector::iterator i = aPathPropVec.begin(); i != aPathPropVec.end(); ++i) + *pPathValues++ = *i; uno::Sequence aGeoPropSeq(2); aGeoPropSeq[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("ViewBox"));