diff options
author | Matthew Pottage <matthewpottage@invincitech.com> | 2014-10-28 16:50:02 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-02-06 23:06:58 +0100 |
commit | 4f7a1f5b9499d5fbeff413a4914283c2bfe7c2d9 (patch) | |
tree | d626505be68b47a1219d9838f9d5dc35c7271248 /writerfilter/source/rtftok | |
parent | fdo#39440: remove redundant checks and breaks (diff) | |
download | core-4f7a1f5b9499d5fbeff413a4914283c2bfe7c2d9.tar.gz core-4f7a1f5b9499d5fbeff413a4914283c2bfe7c2d9.zip |
fdo#75757: Remove inheritance from std::vector
Deprecated comphelper/sequenceasvector.hxx.
Rewritten code using it. Using instead the functions containerToSequence and
sequenceToContainer, found in include/comphelper/sequence.hxx.
One class that inherits from it (in framework/inc/stdtypes.h), and
the code using that has been left.
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/TblStylePrHandler.hxx
writerfilter/source/dmapper/WrapPolygonHandler.hxx
Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061
Diffstat (limited to 'writerfilter/source/rtftok')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 17 |
3 files changed, 13 insertions, 11 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 28607ea63c71..b937b5d3f9cb 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -29,6 +29,7 @@ #include <comphelper/classids.hxx> #include <comphelper/embeddedobjectcontainer.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <comphelper/sequence.hxx> #include <sfx2/sfxbasemodel.hxx> #include <oox/mathml/import.hxx> #include <ooxml/resourceids.hxx> @@ -4628,7 +4629,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) if (rDrawingObject.nPolyLineCount == 0) { uno::Sequence< uno::Sequence<awt::Point> >aPointSequenceSequence(1); - aPointSequenceSequence[0] = rDrawingObject.aPolyLinePoints.getAsConstList(); + aPointSequenceSequence[0] = comphelper::containerToSequence(rDrawingObject.aPolyLinePoints); rDrawingObject.xPropertySet->setPropertyValue("PolyPolygon", uno::Any(aPointSequenceSequence)); } } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index f308f08178e3..09bd60d15df5 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -12,6 +12,7 @@ #include <stack> #include <queue> +#include <vector> #include <boost/optional.hpp> #include <boost/tuple/tuple.hpp> @@ -21,7 +22,6 @@ #include <oox/helper/graphichelper.hxx> #include <oox/mathml/importutils.hxx> #include <rtl/strbuf.hxx> -#include <comphelper/sequenceasvector.hxx> #include <rtftok/RTFDocument.hxx> #include <rtfreferencetable.hxx> @@ -159,7 +159,7 @@ public: sal_Int32 nDhgt; sal_Int32 nFLine; sal_Int32 nPolyLineCount; - comphelper::SequenceAsVector<css::awt::Point> aPolyLinePoints; + std::vector<css::awt::Point> aPolyLinePoints; bool bHadShapeText; }; diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 705a400d3008..aa898f3403d9 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -25,6 +25,7 @@ #include <ooxml/resourceids.hxx> #include <filter/msfilter/util.hxx> #include <svx/svdtrans.hxx> +#include <comphelper/sequence.hxx> #include <rtfsdrimport.hxx> #include <rtfreferenceproperties.hxx> #include <oox/vml/vmlformatting.hxx> @@ -298,7 +299,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap uno::Any aAny; beans::PropertyValue aPropertyValue; awt::Rectangle aViewBox; - comphelper::SequenceAsVector<beans::PropertyValue> aPath; + std::vector<beans::PropertyValue> aPath; // Default line color is black in Word, blue in Writer. uno::Any aLineColor = uno::makeAny(COL_BLACK); // Default line width is 0.75 pt (26 mm100) in Word, 0 in Writer. @@ -380,7 +381,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap aLineWidth <<= i->second.toInt32()/360; else if (i->first == "pVerticies") { - comphelper::SequenceAsVector<drawing::EnhancedCustomShapeParameterPair> aCoordinates; + std::vector<drawing::EnhancedCustomShapeParameterPair> aCoordinates; sal_Int32 nSize = 0; // Size of a token (its value is hardwired in the exporter) sal_Int32 nCount = 0; // Number of tokens sal_Int32 nCharIndex = 0; // Character index @@ -415,12 +416,12 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap } while (nCharIndex >= 0); aPropertyValue.Name = "Coordinates"; - aPropertyValue.Value <<= aCoordinates.getAsConstList(); + aPropertyValue.Value <<= comphelper::containerToSequence(aCoordinates); aPath.push_back(aPropertyValue); } else if (i->first == "pSegmentInfo") { - comphelper::SequenceAsVector<drawing::EnhancedCustomShapeSegment> aSegments; + std::vector<drawing::EnhancedCustomShapeSegment> aSegments; sal_Int32 nSize = 0; sal_Int32 nCount = 0; sal_Int32 nCharIndex = 0; @@ -483,7 +484,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap } while (nCharIndex >= 0); aPropertyValue.Name = "Segments"; - aPropertyValue.Value <<= aSegments.getAsConstList(); + aPropertyValue.Value <<= comphelper::containerToSequence(aSegments); aPath.push_back(aPropertyValue); } else if (i->first == "geoLeft") @@ -799,7 +800,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap } // Creating CustomShapeGeometry property - comphelper::SequenceAsVector<beans::PropertyValue> aGeometry; + std::vector<beans::PropertyValue> aGeometry; if (aViewBox.X || aViewBox.Y || aViewBox.Width || aViewBox.Height) { aViewBox.Width -= aViewBox.X; @@ -811,11 +812,11 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap if (!aPath.empty()) { aPropertyValue.Name = "Path"; - aPropertyValue.Value <<= aPath.getAsConstList(); + aPropertyValue.Value <<= comphelper::containerToSequence(aPath); aGeometry.push_back(aPropertyValue); } if (!aGeometry.empty() && xPropertySet.is() && !m_bTextFrame) - xPropertySet->setPropertyValue("CustomShapeGeometry", uno::Any(aGeometry.getAsConstList())); + xPropertySet->setPropertyValue("CustomShapeGeometry", uno::Any(comphelper::containerToSequence(aGeometry))); // Set position and size if (xShape.is()) |