fdo#63020: Replace ::comphelper::stl_begin()...

And use some templates inside include/com/sun/star/uno/Sequence.hxx

Change-Id: I48875fa1517751fc4cb0cf2b6c08b88975a29b47
Reviewed-on: https://gerrit.libreoffice.org/6599
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Marcos Paulo de Souza 2013-11-06 15:07:46 -02:00 committed by Stephan Bergmann
parent d877941fc7
commit bcb51cff22
29 changed files with 71 additions and 173 deletions

View File

@ -31,7 +31,6 @@
#include <sal/types.h> #include <sal/types.h>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <com/sun/star/i18n/BreakIterator.hpp> #include <com/sun/star/i18n/BreakIterator.hpp>
@ -248,9 +247,7 @@ OUString convertCommaSeparated(
{ {
OUStringBuffer buf; OUStringBuffer buf;
::comphelper::intersperse( ::comphelper::intersperse(
::comphelper::stl_begin(i_rSeq), ::comphelper::stl_end(i_rSeq), i_rSeq.begin(), i_rSeq.end(), ::comphelper::OUStringBufferAppender(buf), OUString( ", " ));
::comphelper::OUStringBufferAppender(buf),
OUString( ", " ));
return buf.makeStringAndClear(); return buf.makeStringAndClear();
} }
@ -268,7 +265,7 @@ uno::Sequence< OUString >
} }
} while (idx >= 0); } while (idx >= 0);
uno::Sequence< OUString > kws(vec.size()); uno::Sequence< OUString > kws(vec.size());
std::copy(vec.begin(), vec.end(), stl_begin(kws)); std::copy(vec.begin(), vec.end(), kws.begin());
return kws; return kws;
} }

View File

@ -11,7 +11,6 @@
#include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/stlunosequence.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <tools/rcid.h> #include <tools/rcid.h>
#include <tools/resary.hxx> #include <tools/resary.hxx>
@ -24,9 +23,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container; using namespace ::com::sun::star::container;
using ::comphelper::stl_begin;
using ::comphelper::stl_end;
namespace namespace
{ {
static ::boost::shared_ptr<ResMgr> GetResMgr(Sequence<Any> const& rArgs) static ::boost::shared_ptr<ResMgr> GetResMgr(Sequence<Any> const& rArgs)
@ -108,7 +104,7 @@ Any SAL_CALL ResourceIndexAccess::getByName(const OUString& aName)
{ {
const Sequence<OUString> aNames(getElementNames()); const Sequence<OUString> aNames(getElementNames());
Reference<XIndexAccess> xResult; Reference<XIndexAccess> xResult;
switch(::std::find(stl_begin(aNames), stl_end(aNames), aName)-stl_begin(aNames)) switch(::std::find(aNames.begin(), aNames.end(), aName) - aNames.begin())
{ {
case 0: case 0:
xResult = Reference<XIndexAccess>(new ResourceStringIndexAccess(m_pResMgr)); xResult = Reference<XIndexAccess>(new ResourceStringIndexAccess(m_pResMgr));
@ -139,7 +135,7 @@ Sequence<OUString> SAL_CALL ResourceIndexAccess::getElementNames( )
throw (RuntimeException) throw (RuntimeException)
{ {
const Sequence<OUString> aNames(getElementNames()); const Sequence<OUString> aNames(getElementNames());
return (::std::find(stl_begin(aNames), stl_end(aNames), aName) != stl_end(aNames)); return (::std::find(aNames.begin(), aNames.end(), aName) != aNames.end());
} }
Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx)

View File

@ -9,7 +9,6 @@
#include <algorithm> #include <algorithm>
#include <com/sun/star/i18n/XOrdinalSuffix.hpp> #include <com/sun/star/i18n/XOrdinalSuffix.hpp>
#include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/Locale.hpp>
#include <comphelper/stlunosequence.hxx>
#include <unotest/bootstrapfixturebase.hxx> #include <unotest/bootstrapfixturebase.hxx>
using namespace com::sun::star; using namespace com::sun::star;
@ -53,15 +52,15 @@ void TestOrdinalSuffix::testFrench()
//1er //1er
aSuffixes = m_xOrdinal->getOrdinalSuffix(1, aLocale); aSuffixes = m_xOrdinal->getOrdinalSuffix(1, aLocale);
pStart = comphelper::stl_begin(aSuffixes); pStart = aSuffixes.begin();
pEnd = comphelper::stl_end(aSuffixes); pEnd = aSuffixes.end();
pFind = std::find(pStart, pEnd, OUString("er")); pFind = std::find(pStart, pEnd, OUString("er"));
CPPUNIT_ASSERT(pFind != pEnd); CPPUNIT_ASSERT(pFind != pEnd);
//2e, 3e, etc. //2e, 3e, etc.
aSuffixes = m_xOrdinal->getOrdinalSuffix(2, aLocale); aSuffixes = m_xOrdinal->getOrdinalSuffix(2, aLocale);
pStart = comphelper::stl_begin(aSuffixes); pStart = aSuffixes.begin();
pEnd = comphelper::stl_end(aSuffixes); pEnd = aSuffixes.end();
pFind = std::find(pStart, pEnd, OUString("e")); pFind = std::find(pStart, pEnd, OUString("e"));
CPPUNIT_ASSERT(pFind != pEnd); CPPUNIT_ASSERT(pFind != pEnd);
} }
@ -74,22 +73,22 @@ void TestOrdinalSuffix::testEnglish()
//1st //1st
aSuffixes = m_xOrdinal->getOrdinalSuffix(1, aLocale); aSuffixes = m_xOrdinal->getOrdinalSuffix(1, aLocale);
pStart = comphelper::stl_begin(aSuffixes); pStart = aSuffixes.begin();
pEnd = comphelper::stl_end(aSuffixes); pEnd = aSuffixes.end();
pFind = std::find(pStart, pEnd, OUString("st")); pFind = std::find(pStart, pEnd, OUString("st"));
CPPUNIT_ASSERT(pFind != pEnd); CPPUNIT_ASSERT(pFind != pEnd);
//2nd //2nd
aSuffixes = m_xOrdinal->getOrdinalSuffix(2, aLocale); aSuffixes = m_xOrdinal->getOrdinalSuffix(2, aLocale);
pStart = comphelper::stl_begin(aSuffixes); pStart = aSuffixes.begin();
pEnd = comphelper::stl_end(aSuffixes); pEnd = aSuffixes.end();
pFind = std::find(pStart, pEnd, OUString("nd")); pFind = std::find(pStart, pEnd, OUString("nd"));
CPPUNIT_ASSERT(pFind != pEnd); CPPUNIT_ASSERT(pFind != pEnd);
//3rd //3rd
aSuffixes = m_xOrdinal->getOrdinalSuffix(3, aLocale); aSuffixes = m_xOrdinal->getOrdinalSuffix(3, aLocale);
pStart = comphelper::stl_begin(aSuffixes); pStart = aSuffixes.begin();
pEnd = comphelper::stl_end(aSuffixes); pEnd = aSuffixes.end();
pFind = std::find(pStart, pEnd, OUString("rd")); pFind = std::find(pStart, pEnd, OUString("rd"));
CPPUNIT_ASSERT(pFind != pEnd); CPPUNIT_ASSERT(pFind != pEnd);
} }

View File

@ -163,6 +163,34 @@ public:
*/ */
inline E * SAL_CALL getArray(); inline E * SAL_CALL getArray();
/** This function allows to use Sequence in standard algorightms, like std::find
and others.
@since LibreOffice 4.2
*/
inline E * begin();
/** This function allows to use Sequence in standard algorightms, like std::find
and others.
@since LibreOffice 4.2
*/
inline E const * begin() const;
/** This function allows to use Sequence in standard algorightms, like std::find
and others.
@since LibreOffice 4.2
*/
inline E * end();
/** This function allows to use Sequence in standard algorightms, like std::find
and others.
@since LibreOffice 4.2
*/
inline E const * end() const;
/** Non-const index operator: Obtains a reference to element indexed at /** Non-const index operator: Obtains a reference to element indexed at
given position. given position.
The implementation does not check for array bounds! The implementation does not check for array bounds!

View File

@ -44,7 +44,6 @@ template< class E >
typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0; typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0;
/// @endcond /// @endcond
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence() SAL_THROW(()) inline Sequence< E >::Sequence() SAL_THROW(())
{ {
@ -55,7 +54,6 @@ inline Sequence< E >::Sequence() SAL_THROW(())
// no bad_alloc, because empty sequence is statically allocated in cppu // no bad_alloc, because empty sequence is statically allocated in cppu
} }
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW(()) inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW(())
{ {
@ -63,7 +61,6 @@ inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW(())
_pSequence = rSeq._pSequence; _pSequence = rSeq._pSequence;
} }
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( inline Sequence< E >::Sequence(
uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW(()) uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW(())
@ -71,7 +68,6 @@ inline Sequence< E >::Sequence(
{ {
} }
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len )
{ {
@ -84,7 +80,6 @@ inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len )
throw ::std::bad_alloc(); throw ::std::bad_alloc();
} }
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( sal_Int32 len ) inline Sequence< E >::Sequence( sal_Int32 len )
{ {
@ -97,7 +92,6 @@ inline Sequence< E >::Sequence( sal_Int32 len )
throw ::std::bad_alloc(); throw ::std::bad_alloc();
} }
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::~Sequence() SAL_THROW(()) inline Sequence< E >::~Sequence() SAL_THROW(())
{ {
@ -106,7 +100,6 @@ inline Sequence< E >::~Sequence() SAL_THROW(())
this, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release ); this, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release );
} }
//______________________________________________________________________________
template< class E > template< class E >
inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) SAL_THROW(()) inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) SAL_THROW(())
{ {
@ -116,7 +109,6 @@ inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq )
return *this; return *this;
} }
//______________________________________________________________________________
template< class E > template< class E >
inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const
SAL_THROW(()) SAL_THROW(())
@ -131,7 +123,6 @@ inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const
(uno_ReleaseFunc)cpp_release ); (uno_ReleaseFunc)cpp_release );
} }
//______________________________________________________________________________
template< class E > template< class E >
inline sal_Bool Sequence< E >::operator != ( const Sequence< E > & rSeq ) const inline sal_Bool Sequence< E >::operator != ( const Sequence< E > & rSeq ) const
SAL_THROW(()) SAL_THROW(())
@ -139,7 +130,6 @@ inline sal_Bool Sequence< E >::operator != ( const Sequence< E > & rSeq ) const
return (! operator == ( rSeq )); return (! operator == ( rSeq ));
} }
//______________________________________________________________________________
template< class E > template< class E >
inline E * Sequence< E >::getArray() inline E * Sequence< E >::getArray()
{ {
@ -153,7 +143,16 @@ inline E * Sequence< E >::getArray()
return reinterpret_cast< E * >( _pSequence->elements ); return reinterpret_cast< E * >( _pSequence->elements );
} }
//______________________________________________________________________________ template<class E> E * Sequence<E>::begin() { return getArray(); }
template<class E> E const * Sequence<E>::begin() const
{ return getConstArray(); }
template<class E> E * Sequence<E>::end() { return begin() + getLength(); }
template<class E> E const * Sequence<E>::end() const
{ return begin() + getLength(); }
template< class E > template< class E >
inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) inline E & Sequence< E >::operator [] ( sal_Int32 nIndex )
{ {
@ -161,7 +160,6 @@ inline E & Sequence< E >::operator [] ( sal_Int32 nIndex )
return getArray()[ nIndex ]; return getArray()[ nIndex ];
} }
//______________________________________________________________________________
template< class E > template< class E >
inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const
SAL_THROW(()) SAL_THROW(())
@ -170,7 +168,6 @@ inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const
return reinterpret_cast< const E * >( _pSequence->elements )[ nIndex ]; return reinterpret_cast< const E * >( _pSequence->elements )[ nIndex ];
} }
//______________________________________________________________________________
template< class E > template< class E >
inline void Sequence< E >::realloc( sal_Int32 nSize ) inline void Sequence< E >::realloc( sal_Int32 nSize )
{ {
@ -183,7 +180,6 @@ inline void Sequence< E >::realloc( sal_Int32 nSize )
throw ::std::bad_alloc(); throw ::std::bad_alloc();
} }
//------------------------------------------------------------------------------
inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
const ::rtl::ByteSequence & rByteSequence ) SAL_THROW(()) const ::rtl::ByteSequence & rByteSequence ) SAL_THROW(())
{ {

View File

@ -1,81 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_COMPHELPER_STLUNOSEQUENCE_HXX
#define INCLUDED_COMPHELPER_STLUNOSEQUENCE_HXX
#include <com/sun/star/uno/Sequence.hxx>
#include <sal/types.h>
namespace comphelper
{
/**
@short stl-container-like access to an existing ::com::sun::star::uno::Sequence
@descr These template functions allows using an existing
::com::sun::star::uno::Sequence using stl algorithms. They provides
standard-compliant mutable random access iterators. Because random access
iterators are the most generic iterators defined by the stl, any stl algorithm
can be applied to the Sequence (excluding algorithms requiring output
iterators).
<p>
Example: (creating a ::std::list from a ::com::sun::star::uno::Sequence)
<code>
::com::sun::star::uno::Sequence<sal_Int32> aSeq(10);
::std::list stl_list(stl_begin(aSeq), stl_end(aSeq));
</code>
<p>
Example: (sorting ::com::sun::star::uno::Sequence inplace)
<code>
::com::sun::star::uno::Sequence<sal_Int32> aSeq(10);
::std::sort(stl_begin(aSeq), stl_seq.end(aSeq));
</code>
<p>
Example: (counting occurrences of 4711 in a ::com::sun::star::uno::Sequence)
<code>
::com::sun::star::uno::Sequence<sal_Int32> aSeq(10);
sal_Int32 count = 0;
::std::count(stl_begin(aSeq), stl_end(aSeq), 4711, count);
</code>
<p>
@see http://www.sgi.com/tech/stl/Container.html
@see http://www.sgi.com/tech/stl/Sequence.html
@see http://www.sgi.com/tech/stl/RandomAccessIterator.html
*/
template <typename V>
V* stl_begin(::com::sun::star::uno::Sequence<V>& rSeq)
{ return rSeq.getArray(); }
template <typename V>
V* stl_end(::com::sun::star::uno::Sequence<V>& rSeq)
{ return rSeq.getArray() + rSeq.getLength(); }
template <typename V>
const V* stl_begin(const ::com::sun::star::uno::Sequence<V>& rSeq)
{ return rSeq.getConstArray(); }
template <typename V>
const V* stl_end(const ::com::sun::star::uno::Sequence<V>& rSeq)
{ return rSeq.getConstArray() + rSeq.getLength(); }
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -69,7 +69,6 @@
#include "comphelper/mediadescriptor.hxx" #include "comphelper/mediadescriptor.hxx"
#include "comphelper/processfactory.hxx" #include "comphelper/processfactory.hxx"
#include "comphelper/sequenceasvector.hxx" #include "comphelper/sequenceasvector.hxx"
#include "comphelper/stlunosequence.hxx"
#include "comphelper/storagehelper.hxx" #include "comphelper/storagehelper.hxx"
#include "cppuhelper/basemutex.hxx" #include "cppuhelper/basemutex.hxx"
#include "cppuhelper/compbase6.hxx" #include "cppuhelper/compbase6.hxx"
@ -547,7 +546,6 @@
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <comphelper/solarmutex.hxx> #include <comphelper/solarmutex.hxx>
#include <comphelper/stillreadwriteinteraction.hxx> #include <comphelper/stillreadwriteinteraction.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/synchronousdispatch.hxx> #include <comphelper/synchronousdispatch.hxx>

View File

@ -66,7 +66,6 @@
#include "comphelper/storagehelper.hxx" #include "comphelper/storagehelper.hxx"
#include "comphelper/mediadescriptor.hxx" #include "comphelper/mediadescriptor.hxx"
#include "comphelper/sequenceasvector.hxx" #include "comphelper/sequenceasvector.hxx"
#include "comphelper/stlunosequence.hxx"
#include "sot/storage.hxx" #include "sot/storage.hxx"
#include "sfx2/docfile.hxx" #include "sfx2/docfile.hxx"
#include "sax/tools/converter.hxx" #include "sax/tools/converter.hxx"
@ -2306,9 +2305,7 @@ void SfxDocumentMetaData::createUserDefined()
{ {
const css::uno::Sequence<css::uno::Reference<css::uno::XInterface> > const css::uno::Sequence<css::uno::Reference<css::uno::XInterface> >
listeners(m_NotifyListeners.getElements()); listeners(m_NotifyListeners.getElements());
for (css::uno::Reference< css::uno::XInterface > const * iter = for (css::uno::Reference< css::uno::XInterface > const * iter = listeners.begin(); iter != listeners.end(); ++iter) {
::comphelper::stl_begin(listeners);
iter != ::comphelper::stl_end(listeners); ++iter) {
xMB->addModifyListener( xMB->addModifyListener(
css::uno::Reference< css::util::XModifyListener >(*iter, css::uno::Reference< css::util::XModifyListener >(*iter,
css::uno::UNO_QUERY)); css::uno::UNO_QUERY));

View File

@ -24,7 +24,6 @@
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/namedvaluecollection.hxx> #include <comphelper/namedvaluecollection.hxx>
#include <comphelper/types.hxx> #include <comphelper/types.hxx>
#include <comphelper/stlunosequence.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>

View File

@ -9,14 +9,12 @@
#include <SyncDbusSessionHelper.hxx> #include <SyncDbusSessionHelper.hxx>
#include <comphelper/stlunosequence.hxx>
#include <gio/gio.h> #include <gio/gio.h>
#include <vector> #include <vector>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::comphelper;
using namespace ::std; using namespace ::std;
using namespace ::rtl; using namespace ::rtl;
@ -71,7 +69,7 @@ namespace shell { namespace sessioninstall
vector< OString > vPackagesOString; vector< OString > vPackagesOString;
vPackagesOString.reserve(vPackages.getLength()); vPackagesOString.reserve(vPackages.getLength());
boost::shared_ptr<GVariantBuilder> pBuilder(g_variant_builder_new(G_VARIANT_TYPE ("as")), GVariantBuilderDeleter()); boost::shared_ptr<GVariantBuilder> pBuilder(g_variant_builder_new(G_VARIANT_TYPE ("as")), GVariantBuilderDeleter());
for( const OUString* pPackage = stl_begin(vPackages); pPackage != stl_end(vPackages); ++pPackage) for( const OUString* pPackage = vPackages.begin(); pPackage != vPackages.end(); ++pPackage)
{ {
vPackagesOString.push_back(OUStringToOString(*pPackage, RTL_TEXTENCODING_ASCII_US)); vPackagesOString.push_back(OUStringToOString(*pPackage, RTL_TEXTENCODING_ASCII_US));
g_variant_builder_add(pBuilder.get(), "s", vPackagesOString.back().getStr()); g_variant_builder_add(pBuilder.get(), "s", vPackagesOString.back().getStr());

View File

@ -275,7 +275,6 @@
#include <comphelper/servicedecl.hxx> #include <comphelper/servicedecl.hxx>
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/types.hxx> #include <comphelper/types.hxx>

View File

@ -29,7 +29,6 @@
#include <com/sun/star/awt/grid/XGridColumnListener.hpp> #include <com/sun/star/awt/grid/XGridColumnListener.hpp>
#include <com/sun/star/awt/grid/XSortableGridData.hpp> #include <com/sun/star/awt/grid/XSortableGridData.hpp>
#include <comphelper/stlunosequence.hxx>
#include <cppuhelper/weakref.hxx> #include <cppuhelper/weakref.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>

View File

@ -28,7 +28,6 @@
#include <com/sun/star/view/SelectionType.hpp> #include <com/sun/star/view/SelectionType.hpp>
#include <com/sun/star/awt/grid/XGridColumnListener.hpp> #include <com/sun/star/awt/grid/XGridColumnListener.hpp>
#include <comphelper/stlunosequence.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>

View File

@ -97,7 +97,6 @@
#include <comphelper/mediadescriptor.hxx> #include <comphelper/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx> #include <comphelper/sequenceashashmap.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <config_version.h> #include <config_version.h>

View File

@ -456,7 +456,6 @@
#include <comphelper/sequenceasvector.hxx> #include <comphelper/sequenceasvector.hxx>
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/types.hxx> #include <comphelper/types.hxx>

View File

@ -68,7 +68,6 @@
// #i10825# // #i10825#
#include <parachangetrackinginfo.hxx> #include <parachangetrackinginfo.hxx>
#include <com/sun/star/text/TextMarkupType.hpp> #include <com/sun/star/text/TextMarkupType.hpp>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <algorithm> #include <algorithm>
@ -1389,15 +1388,11 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
else else
{ {
const OUString* aRequestedAttrIter = const OUString* aRequestedAttrIter =
::std::find( ::comphelper::stl_begin( aRequestedAttributes ), ::std::find( aRequestedAttributes.begin(), aRequestedAttributes.end(), sMMToPixelRatio );
::comphelper::stl_end( aRequestedAttributes ), if ( aRequestedAttrIter != aRequestedAttributes.end() )
sMMToPixelRatio );
if ( aRequestedAttrIter != ::comphelper::stl_end( aRequestedAttributes ) )
{
bProvideMMToPixelRatio = true; bProvideMMToPixelRatio = true;
} }
} }
}
uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() + uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() +
( bProvideMMToPixelRatio ? 1 : 0 ) ); ( bProvideMMToPixelRatio ? 1 : 0 ) );

View File

@ -22,7 +22,6 @@
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <comphelper/stlunosequence.hxx>
#include <com/sun/star/text/TextMarkupType.hpp> #include <com/sun/star/text/TextMarkupType.hpp>
#include <com/sun/star/accessibility/TextSegment.hpp> #include <com/sun/star/accessibility/TextSegment.hpp>
@ -207,8 +206,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
uno::Sequence< ::com::sun::star::accessibility::TextSegment > aTextMarkups( uno::Sequence< ::com::sun::star::accessibility::TextSegment > aTextMarkups(
aTmpTextMarkups.size() ); aTmpTextMarkups.size() );
::std::copy( aTmpTextMarkups.begin(), aTmpTextMarkups.end(), ::std::copy( aTmpTextMarkups.begin(), aTmpTextMarkups.end(), aTextMarkups.begin() );
::comphelper::stl_begin( aTextMarkups ) );
return aTextMarkups; return aTextMarkups;
} }

View File

@ -22,7 +22,6 @@
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <comphelper/stlunosequence.hxx>
#include <SwXTextDefaults.hxx> #include <SwXTextDefaults.hxx>
#include <SwStyleNameMapper.hxx> #include <SwStyleNameMapper.hxx>
@ -251,7 +250,7 @@ sal_Bool SAL_CALL SwXTextDefaults::supportsService( const OUString& rServiceName
throw (RuntimeException) throw (RuntimeException)
{ {
uno::Sequence< OUString > aSeq(getSupportedServiceNames()); uno::Sequence< OUString > aSeq(getSupportedServiceNames());
return std::find(comphelper::stl_begin(aSeq), comphelper::stl_end(aSeq), rServiceName) != comphelper::stl_end(aSeq); return std::find(aSeq.begin(), aSeq.end(), rServiceName) != aSeq.end();
} }

View File

@ -85,7 +85,6 @@
#include <fmtline.hxx> #include <fmtline.hxx>
#include <fmtfsize.hxx> #include <fmtfsize.hxx>
#include <comphelper/extract.hxx> #include <comphelper/extract.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <doctok/sprmids.hxx> #include <doctok/sprmids.hxx>
@ -3673,7 +3672,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
{ {
uno::Sequence< OUString > vListEntries; uno::Sequence< OUString > vListEntries;
pListEntries->second >>= vListEntries; pListEntries->second >>= vListEntries;
copy(::comphelper::stl_begin(vListEntries), ::comphelper::stl_end(vListEntries), back_inserter(aListItems)); copy(vListEntries.begin(), vListEntries.end(), back_inserter(aListItems));
} }
} }

View File

@ -46,7 +46,6 @@
#include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp>
#include <comphelper/extract.hxx> #include <comphelper/extract.hxx>
#include <comphelper/stlunosequence.hxx>
#include <com/sun/star/beans/XPropertyContainer.hpp> #include <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp>
@ -287,7 +286,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
if ( pFieldmark != NULL ) if ( pFieldmark != NULL )
{ {
uno::Sequence< OUString > vListEntries(aFormula.maListEntries.size()); uno::Sequence< OUString > vListEntries(aFormula.maListEntries.size());
::std::copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries)); ::std::copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), vListEntries.begin());
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries); (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries);
sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0;
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(nIndex); (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(nIndex);

View File

@ -20,7 +20,6 @@
#include "defaultgriddatamodel.hxx" #include "defaultgriddatamodel.hxx"
#include <comphelper/stlunosequence.hxx>
#include <comphelper/componentguard.hxx> #include <comphelper/componentguard.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <toolkit/helper/servicenames.hxx> #include <toolkit/helper/servicenames.hxx>
@ -46,9 +45,6 @@ namespace toolkit
using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Exception;
using ::com::sun::star::util::XCloneable; using ::com::sun::star::util::XCloneable;
using ::comphelper::stl_begin;
using ::comphelper::stl_end;
//================================================================================================================== //==================================================================================================================
//= DefaultGridDataModel //= DefaultGridDataModel
//================================================================================================================== //==================================================================================================================
@ -190,7 +186,7 @@ namespace toolkit
// create new data row // create new data row
RowData newRow( i_assumedColCount > 0 ? i_assumedColCount : i_rowData.getLength() ); RowData newRow( i_assumedColCount > 0 ? i_assumedColCount : i_rowData.getLength() );
RowData::iterator cellData = newRow.begin(); RowData::iterator cellData = newRow.begin();
for ( const Any* pData = stl_begin( i_rowData ); pData != stl_end( i_rowData ); ++pData, ++cellData ) for ( const Any* pData = i_rowData.begin(); pData != i_rowData.end(); ++pData, ++cellData )
cellData->first = *pData; cellData->first = *pData;
// insert data row // insert data row
@ -349,8 +345,8 @@ namespace toolkit
rDataRow[ columnIndex ].first = i_values[ col ]; rDataRow[ columnIndex ].first = i_values[ col ];
} }
sal_Int32 const firstAffectedColumn = *::std::min_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) ); sal_Int32 const firstAffectedColumn = *::std::min_element( i_columnIndexes.begin(), i_columnIndexes.end() );
sal_Int32 const lastAffectedColumn = *::std::max_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) ); sal_Int32 const lastAffectedColumn = *::std::max_element( i_columnIndexes.begin(), i_columnIndexes.end() );
broadcast( broadcast(
GridDataEvent( *this, firstAffectedColumn, lastAffectedColumn, i_rowIndex, i_rowIndex ), GridDataEvent( *this, firstAffectedColumn, lastAffectedColumn, i_rowIndex, i_rowIndex ),
&XGridDataListener::dataChanged, &XGridDataListener::dataChanged,

View File

@ -56,7 +56,6 @@
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/sequenceasvector.hxx> #include <comphelper/sequenceasvector.hxx>
#include <comphelper/makesequence.hxx> #include <comphelper/makesequence.hxx>
#include <comphelper/xmltools.hxx> #include <comphelper/xmltools.hxx>
@ -1493,8 +1492,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
} else { } else {
m_RDFaXHTMLContentSet.insert(sXmlId); m_RDFaXHTMLContentSet.insert(sXmlId);
} }
::std::for_each(::comphelper::stl_begin(i_rPredicates), ::std::for_each(i_rPredicates.begin(), i_rPredicates.end(),
::comphelper::stl_end(i_rPredicates),
::boost::bind( &librdf_Repository::addStatementGraph, ::boost::bind( &librdf_Repository::addStatementGraph,
this, i_xSubject, _1, xContent, xXmlId, true)); this, i_xSubject, _1, xContent, xXmlId, true));
} }

View File

@ -156,7 +156,6 @@
#include <comphelper/embeddedobjectcontainer.hxx> #include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/mediadescriptor.hxx> #include <comphelper/mediadescriptor.hxx>
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/types.hxx> #include <comphelper/types.hxx>

View File

@ -67,7 +67,6 @@
#include <map> #include <map>
#include <comphelper/stlunosequence.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
#include <officecfg/Office/Common.hxx> #include <officecfg/Office/Common.hxx>
@ -88,7 +87,7 @@ void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFie
const FFDataHandler::DropDownEntries_t& rEntries = pFFDataHandler->getDropDownEntries(); const FFDataHandler::DropDownEntries_t& rEntries = pFFDataHandler->getDropDownEntries();
uno::Sequence< OUString > sItems( rEntries.size() ); uno::Sequence< OUString > sItems( rEntries.size() );
::std::copy( rEntries.begin(), rEntries.end(), ::comphelper::stl_begin(sItems)); ::std::copy( rEntries.begin(), rEntries.end(), sItems.begin());
if ( sItems.getLength() ) if ( sItems.getLength() )
rxFieldProps->setPropertyValue( "Items", uno::makeAny( sItems ) ); rxFieldProps->setPropertyValue( "Items", uno::makeAny( sItems ) );

View File

@ -37,7 +37,6 @@
#include "FormControlHelper.hxx" #include "FormControlHelper.hxx"
#include <xmloff/odffields.hxx> #include <xmloff/odffields.hxx>
#include <comphelper/stlunosequence.hxx>
namespace writerfilter { namespace writerfilter {
namespace dmapper { namespace dmapper {
@ -237,7 +236,7 @@ bool FormControlHelper::processField(uno::Reference<text::XFormField> xFormField
xFormField->setFieldType(ODF_FORMDROPDOWN); xFormField->setFieldType(ODF_FORMDROPDOWN);
uno::Sequence< OUString > sItems; uno::Sequence< OUString > sItems;
sItems.realloc( m_pFFData->getDropDownEntries().size() ); sItems.realloc( m_pFFData->getDropDownEntries().size() );
::std::copy( m_pFFData->getDropDownEntries().begin(), m_pFFData->getDropDownEntries().end(), ::comphelper::stl_begin(sItems)); ::std::copy( m_pFFData->getDropDownEntries().begin(), m_pFFData->getDropDownEntries().end(), sItems.begin());
if ( sItems.getLength() ) if ( sItems.getLength() )
{ {
if ( xNameCont->hasByName(ODF_FORMDROPDOWN_LISTENTRY) ) if ( xNameCont->hasByName(ODF_FORMDROPDOWN_LISTENTRY) )

View File

@ -497,7 +497,6 @@
#include <comphelper/sequenceasvector.hxx> #include <comphelper/sequenceasvector.hxx>
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/types.hxx> #include <comphelper/types.hxx>

View File

@ -24,7 +24,6 @@
#include <xmloff/xmlexp.hxx> #include <xmloff/xmlexp.hxx>
#include <xmloff/xmltoken.hxx> #include <xmloff/xmltoken.hxx>
#include <comphelper/stlunosequence.hxx>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
@ -174,13 +173,12 @@ RDFaExportHelper::AddRDFa(
OUStringBuffer property; OUStringBuffer property;
::comphelper::intersperse( ::comphelper::intersperse(
::boost::make_transform_iterator( ::boost::make_transform_iterator(rStatements.begin(),
::comphelper::stl_begin(rStatements),
::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&makeCURIE, &m_rExport,
::boost::bind(&rdf::Statement::Predicate, _1))), ::boost::bind(&rdf::Statement::Predicate, _1))),
// argh, this must be the same type :( // argh, this must be the same type :(
::boost::make_transform_iterator( ::boost::make_transform_iterator(
::comphelper::stl_end(rStatements), rStatements.end(),
::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&makeCURIE, &m_rExport,
::boost::bind(&rdf::Statement::Predicate, _1))), ::boost::bind(&rdf::Statement::Predicate, _1))),
::comphelper::OUStringBufferAppender(property), ::comphelper::OUStringBufferAppender(property),

View File

@ -58,7 +58,6 @@
#include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XPropertyState.hpp>
#include <txtlists.hxx> #include <txtlists.hxx>
#include <xmloff/odffields.hxx> #include <xmloff/odffields.hxx>
#include <comphelper/stlunosequence.hxx>
using ::com::sun::star::ucb::XAnyCompare; using ::com::sun::star::ucb::XAnyCompare;
@ -869,7 +868,7 @@ namespace
if(!vListEntries.empty()) if(!vListEntries.empty())
{ {
Sequence<OUString> vListEntriesSeq(vListEntries.size()); Sequence<OUString> vListEntriesSeq(vListEntries.size());
copy(vListEntries.begin(), vListEntries.end(), ::comphelper::stl_begin(vListEntriesSeq)); copy(vListEntries.begin(), vListEntries.end(), vListEntriesSeq.begin());
vOutParams[OUString(ODF_FORMDROPDOWN_LISTENTRY)] = makeAny(vListEntriesSeq); vOutParams[OUString(ODF_FORMDROPDOWN_LISTENTRY)] = makeAny(vListEntriesSeq);
} }
for(::std::map<OUString, Any>::const_iterator pCurrent = vOutParams.begin(); for(::std::map<OUString, Any>::const_iterator pCurrent = vOutParams.begin();

View File

@ -98,7 +98,6 @@
#include "MultiPropertySetHelper.hxx" #include "MultiPropertySetHelper.hxx"
#include <xmloff/formlayerexport.hxx> #include <xmloff/formlayerexport.hxx>
#include "XMLTextCharStyleNamesElementExport.hxx" #include "XMLTextCharStyleNamesElementExport.hxx"
#include <comphelper/stlunosequence.hxx>
#include <xmloff/odffields.hxx> #include <xmloff/odffields.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx>
@ -382,7 +381,7 @@ void FieldParamExporter::Export()
const Type aSeqType = ::getCppuType((Sequence<OUString>*)0); const Type aSeqType = ::getCppuType((Sequence<OUString>*)0);
const Type aIntType = ::getCppuType((sal_Int32*)0); const Type aIntType = ::getCppuType((sal_Int32*)0);
Sequence<OUString> vParameters(m_xFieldParams->getElementNames()); Sequence<OUString> vParameters(m_xFieldParams->getElementNames());
for(const OUString* pCurrent=::comphelper::stl_begin(vParameters); pCurrent!=::comphelper::stl_end(vParameters); ++pCurrent) for(const OUString* pCurrent = vParameters.begin(); pCurrent != vParameters.end(); ++pCurrent)
{ {
const Any aValue = m_xFieldParams->getByName(*pCurrent); const Any aValue = m_xFieldParams->getByName(*pCurrent);
const Type aValueType = aValue.getValueType(); const Type aValueType = aValue.getValueType();
@ -423,7 +422,7 @@ void FieldParamExporter::Export()
{ {
Sequence<OUString> vValue; Sequence<OUString> vValue;
aValue >>= vValue; aValue >>= vValue;
for(OUString* pSeqCurrent = ::comphelper::stl_begin(vValue); pSeqCurrent != ::comphelper::stl_end(vValue); ++pSeqCurrent) for(OUString* pSeqCurrent = vValue.begin(); pSeqCurrent != vValue.end(); ++pSeqCurrent)
{ {
ExportParameter(*pCurrent, *pSeqCurrent); ExportParameter(*pCurrent, *pSeqCurrent);
} }