summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatthew Pottage <matthewpottage@invincitech.com>2014-10-28 16:50:02 +0000
committerMichael Stahl <mstahl@redhat.com>2015-02-06 23:06:58 +0100
commit4f7a1f5b9499d5fbeff413a4914283c2bfe7c2d9 (patch)
treed626505be68b47a1219d9838f9d5dc35c7271248 /sw
parent90613f4e47e5e113e5fafb573d832bfcace314e5 (diff)
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 'sw')
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx8
-rw-r--r--sw/source/core/unocore/unocoll.cxx6
-rw-r--r--sw/source/core/unocore/unosett.cxx6
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx8
7 files changed, 20 insertions, 19 deletions
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index fadb0801ab42..9f091e1d2bac 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -463,7 +463,6 @@
#include <comphelper/scoped_disposing_ptr.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/sequenceashashmap.hxx>
-#include <comphelper/sequenceasvector.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index dc763f872233..d778685749d0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/text/GraphicCrop.hpp>
#include <comphelper/sequenceashashmap.hxx>
-#include <comphelper/sequenceasvector.hxx>
class Test : public SwModelTestBase
{
@@ -1503,7 +1502,8 @@ DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx")
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
comphelper::SequenceAsHashMap aPath(aCustomShapeGeometry["Path"]);
- comphelper::SequenceAsVector<awt::Size> aSubViewSize(aPath["SubViewSize"]);
+ uno::Sequence<awt::Size> aSubViewSize((aPath["SubViewSize"]).get<uno::Sequence<awt::Size> >() );
+
// This was 0.
CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aSubViewSize[0].Height);
}
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 9c17966e9282..4635b3e777a7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -86,7 +86,7 @@
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
#include <svx/unoapi.hxx>
-#include <comphelper/sequenceasvector.hxx>
+#include <comphelper/sequence.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/color/bcolortools.hxx>
@@ -207,14 +207,14 @@ public:
class BorderLines
{
- typedef ::comphelper::SequenceAsVector<
+ typedef ::std::vector<
::rtl::Reference<BorderLinePrimitive2D> > Lines_t;
Lines_t m_Lines;
public:
void AddBorderLine(::rtl::Reference<BorderLinePrimitive2D> const& xLine, SwPaintProperties& properties);
drawinglayer::primitive2d::Primitive2DSequence GetBorderLines_Clear()
{
- ::comphelper::SequenceAsVector<
+ ::std::vector<
::drawinglayer::primitive2d::Primitive2DReference> lines;
for (Lines_t::const_iterator it = m_Lines.begin(); it != m_Lines.end();
++it)
@@ -222,7 +222,7 @@ public:
lines.push_back(it->get());
}
m_Lines.clear();
- return lines.getAsConstList();
+ return comphelper::containerToSequence(lines);
}
};
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 2a0f65c1b15f..b185d9d9e837 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -82,7 +82,7 @@
#include <vbahelper/vbaaccesshelper.hxx>
#include <basic/basmgr.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/sequenceasvector.hxx>
+#include <comphelper/sequence.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::document;
@@ -1668,7 +1668,7 @@ uno::Sequence< OUString > SwXBookmarks::getElementNames(void)
if(!IsValid())
throw uno::RuntimeException();
- ::comphelper::SequenceAsVector< OUString > ret;
+ ::std::vector< OUString > ret;
IDocumentMarkAccess* const pMarkAccess = GetDoc()->getIDocumentMarkAccess();
for (IDocumentMarkAccess::const_iterator_t ppMark =
pMarkAccess->getBookmarksBegin();
@@ -1680,7 +1680,7 @@ uno::Sequence< OUString > SwXBookmarks::getElementNames(void)
ret.push_back((*ppMark)->GetName()); // only add real bookmarks
}
}
- return ret.getAsConstList();
+ return comphelper::containerToSequence(ret);
}
sal_Bool SwXBookmarks::hasByName(const OUString& rName)
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index b8bb32292dae..1a17f3d579b7 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -64,8 +64,8 @@
#include <com/sun/star/text/PositionAndSpaceMode.hpp>
#include <com/sun/star/text/LabelFollow.hpp>
#include <numrule.hxx>
-#include <comphelper/sequenceasvector.hxx>
#include <comphelper/servicehelper.hxx>
+#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <paratr.hxx>
@@ -1360,7 +1360,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
{
bool bChapterNum = pHeadingStyleName != 0;
- ::comphelper::SequenceAsVector<PropertyValue> aPropertyValues;
+ ::std::vector<PropertyValue> aPropertyValues;
aPropertyValues.reserve(32);
//fill all properties into the array
@@ -1530,7 +1530,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFmt(
makePropertyValue(aUString, UNO_NAME_HEADING_STYLE_NAME));
}
- return aPropertyValues.getAsConstList();
+ return ::comphelper::containerToSequence(aPropertyValues);
}
static PropertyValue const* lcl_FindProperty(
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index d8dfed2cd3cc..6141ea65527d 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -71,7 +71,7 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <comphelper/sequenceasvector.hxx>
+#include <comphelper/sequence.hxx>
//UUUU
#include <svx/unobrushitemhelper.hxx>
@@ -767,7 +767,7 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- comphelper::SequenceAsVector< OUString > aRet;
+ std::vector< OUString > aRet;
if(pBasePool)
{
SfxStyleSheetIteratorPtr pIt = pBasePool->CreateIterator(eFamily, SFXSTYLEBIT_ALL);
@@ -782,7 +782,7 @@ uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::Runt
else
throw uno::RuntimeException();
- return aRet.getAsConstList();
+ return comphelper::containerToSequence(aRet);
}
sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeException, std::exception )
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 8a17fd144b74..98cdff3d5877 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -30,7 +30,9 @@
#include <docxattributeoutput.hxx>
#include <docxexportfilter.hxx>
#include <comphelper/seqstream.hxx>
-#include <comphelper/sequenceasvector.hxx>
+#include <comphelper/sequence.hxx>
+
+
#include <IDocumentDrawModelAccess.hxx>
using namespace com::sun::star;
@@ -667,8 +669,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS
XML_edited, "0",
FSEND);
drawing::PointSequenceSequence aSeqSeq = it->second.get< drawing::PointSequenceSequence >();
- comphelper::SequenceAsVector<awt::Point> aPoints(aSeqSeq[0]);
- for (comphelper::SequenceAsVector<awt::Point>::iterator i = aPoints.begin(); i != aPoints.end(); ++i)
+ std::vector<awt::Point> aPoints(comphelper::sequenceToContainer<std::vector<awt::Point> >(aSeqSeq[0]));
+ for (std::vector<awt::Point>::iterator i = aPoints.begin(); i != aPoints.end(); ++i)
{
awt::Point& rPoint = *i;
m_pImpl->m_pSerializer->singleElementNS(XML_wp, (i == aPoints.begin() ? XML_start : XML_lineTo),