summaryrefslogtreecommitdiff
path: root/sax
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 /sax
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 'sax')
-rw-r--r--sax/qa/cppunit/test_converter.cxx10
-rw-r--r--sax/source/tools/fastserializer.cxx6
2 files changed, 8 insertions, 8 deletions
diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx
index 968292a54154..32b65f4e61b7 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/util/MeasureUnit.hpp>
#include "sax/tools/converter.hxx"
-#include "comphelper/sequenceasvector.hxx"
+#include <comphelper/sequence.hxx>
#include "sal/log.hxx"
@@ -664,23 +664,23 @@ void doTestDecodeBase64(const uno::Sequence<sal_Int8>& aPass, char const*const p
void ConverterTest::testBase64()
{
- comphelper::SequenceAsVector< sal_Int8 > tempSeq(4);
+ std::vector< sal_Int8 > tempSeq(4);
for(sal_Int8 i = 0; i<4; ++i)
tempSeq.push_back(i);
- uno::Sequence< sal_Int8 > tempSequence = tempSeq.getAsConstList();
+ uno::Sequence< sal_Int8 > tempSequence = comphelper::containerToSequence(tempSeq);
doTestEncodeBase64("AAAAAAABAgM=", tempSequence);
doTestDecodeBase64(tempSequence, "AAAAAAABAgM=");
tempSeq[0] = sal_Int8(5);
tempSeq[1] = sal_Int8(2);
tempSeq[2] = sal_Int8(3);
- tempSequence = tempSeq.getAsConstList();
+ tempSequence = comphelper::containerToSequence(tempSeq);
doTestEncodeBase64("BQIDAAABAgM=", tempSequence);
doTestDecodeBase64(tempSequence, "BQIDAAABAgM=");
tempSeq[0] = sal_Int8(sal_uInt8(200));
tempSeq[1] = sal_Int8(31);
tempSeq[2] = sal_Int8(77);
tempSeq[3] = sal_Int8(111);
- tempSequence = tempSeq.getAsConstList();
+ tempSequence = comphelper::containerToSequence(tempSeq);
doTestEncodeBase64("yB9NbwABAgM=", tempSequence);
doTestDecodeBase64(tempSequence, "yB9NbwABAgM=");
}
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 394af442ff21..4c1848bb08e7 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/xml/sax/FastTokenHandler.hpp>
#include <rtl/math.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/sequenceasvector.hxx>
+#include <comphelper/sequence.hxx>
#include <string.h>
@@ -31,7 +31,7 @@
#include <set>
#endif
-using ::comphelper::SequenceAsVector;
+using ::std::vector;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::xml::Attribute;
@@ -444,7 +444,7 @@ namespace sax_fastparser {
void FastSaxSerializer::ForSort::setCurrentElement( sal_Int32 nElement )
{
- SequenceAsVector< sal_Int32 > aOrder( maOrder );
+ vector< sal_Int32 > aOrder( comphelper::sequenceToContainer<vector<sal_Int32> >(maOrder) );
if( std::find( aOrder.begin(), aOrder.end(), nElement ) != aOrder.end() )
{
mnCurrentElement = nElement;