diff options
29 files changed, 71 insertions, 173 deletions
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index d5d249eb91f6..4a5f9df8b623 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -31,7 +31,6 @@ #include <sal/types.h> #include <comphelper/string.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/stl_types.hxx> #include <com/sun/star/i18n/BreakIterator.hpp> @@ -248,9 +247,7 @@ OUString convertCommaSeparated( { OUStringBuffer buf; ::comphelper::intersperse( - ::comphelper::stl_begin(i_rSeq), ::comphelper::stl_end(i_rSeq), - ::comphelper::OUStringBufferAppender(buf), - OUString( ", " )); + i_rSeq.begin(), i_rSeq.end(), ::comphelper::OUStringBufferAppender(buf), OUString( ", " )); return buf.makeStringAndClear(); } @@ -268,7 +265,7 @@ uno::Sequence< OUString > } } while (idx >= 0); 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; } diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx index aff2218f832c..93d06b2744aa 100644 --- a/extensions/source/resource/ResourceIndexAccess.cxx +++ b/extensions/source/resource/ResourceIndexAccess.cxx @@ -11,7 +11,6 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <comphelper/stlunosequence.hxx> #include <osl/mutex.hxx> #include <tools/rcid.h> #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::container; -using ::comphelper::stl_begin; -using ::comphelper::stl_end; - namespace { 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()); 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: xResult = Reference<XIndexAccess>(new ResourceStringIndexAccess(m_pResMgr)); @@ -139,7 +135,7 @@ Sequence<OUString> SAL_CALL ResourceIndexAccess::getElementNames( ) throw (RuntimeException) { 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) diff --git a/i18npool/qa/cppunit/test_ordinalsuffix.cxx b/i18npool/qa/cppunit/test_ordinalsuffix.cxx index 7b08aef44539..eb6cd0c76d2e 100644 --- a/i18npool/qa/cppunit/test_ordinalsuffix.cxx +++ b/i18npool/qa/cppunit/test_ordinalsuffix.cxx @@ -9,7 +9,6 @@ #include <algorithm> #include <com/sun/star/i18n/XOrdinalSuffix.hpp> #include <com/sun/star/lang/Locale.hpp> -#include <comphelper/stlunosequence.hxx> #include <unotest/bootstrapfixturebase.hxx> using namespace com::sun::star; @@ -53,15 +52,15 @@ void TestOrdinalSuffix::testFrench() //1er aSuffixes = m_xOrdinal->getOrdinalSuffix(1, aLocale); - pStart = comphelper::stl_begin(aSuffixes); - pEnd = comphelper::stl_end(aSuffixes); + pStart = aSuffixes.begin(); + pEnd = aSuffixes.end(); pFind = std::find(pStart, pEnd, OUString("er")); CPPUNIT_ASSERT(pFind != pEnd); //2e, 3e, etc. aSuffixes = m_xOrdinal->getOrdinalSuffix(2, aLocale); - pStart = comphelper::stl_begin(aSuffixes); - pEnd = comphelper::stl_end(aSuffixes); + pStart = aSuffixes.begin(); + pEnd = aSuffixes.end(); pFind = std::find(pStart, pEnd, OUString("e")); CPPUNIT_ASSERT(pFind != pEnd); } @@ -74,22 +73,22 @@ void TestOrdinalSuffix::testEnglish() //1st aSuffixes = m_xOrdinal->getOrdinalSuffix(1, aLocale); - pStart = comphelper::stl_begin(aSuffixes); - pEnd = comphelper::stl_end(aSuffixes); + pStart = aSuffixes.begin(); + pEnd = aSuffixes.end(); pFind = std::find(pStart, pEnd, OUString("st")); CPPUNIT_ASSERT(pFind != pEnd); //2nd aSuffixes = m_xOrdinal->getOrdinalSuffix(2, aLocale); - pStart = comphelper::stl_begin(aSuffixes); - pEnd = comphelper::stl_end(aSuffixes); + pStart = aSuffixes.begin(); + pEnd = aSuffixes.end(); pFind = std::find(pStart, pEnd, OUString("nd")); CPPUNIT_ASSERT(pFind != pEnd); //3rd aSuffixes = m_xOrdinal->getOrdinalSuffix(3, aLocale); - pStart = comphelper::stl_begin(aSuffixes); - pEnd = comphelper::stl_end(aSuffixes); + pStart = aSuffixes.begin(); + pEnd = aSuffixes.end(); pFind = std::find(pStart, pEnd, OUString("rd")); CPPUNIT_ASSERT(pFind != pEnd); } diff --git a/include/com/sun/star/uno/Sequence.h b/include/com/sun/star/uno/Sequence.h index d57200ad3144..0e180a576119 100644 --- a/include/com/sun/star/uno/Sequence.h +++ b/include/com/sun/star/uno/Sequence.h @@ -163,6 +163,34 @@ public: */ 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 given position. The implementation does not check for array bounds! diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx index a37a222c7b72..6e009f52af6a 100644 --- a/include/com/sun/star/uno/Sequence.hxx +++ b/include/com/sun/star/uno/Sequence.hxx @@ -44,7 +44,6 @@ template< class E > typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0; /// @endcond -//______________________________________________________________________________ template< class E > 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 } -//______________________________________________________________________________ template< class E > 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; } -//______________________________________________________________________________ template< class E > inline Sequence< E >::Sequence( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW(()) @@ -71,7 +68,6 @@ inline Sequence< E >::Sequence( { } -//______________________________________________________________________________ template< class E > 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(); } -//______________________________________________________________________________ template< class E > inline Sequence< E >::Sequence( sal_Int32 len ) { @@ -97,7 +92,6 @@ inline Sequence< E >::Sequence( sal_Int32 len ) throw ::std::bad_alloc(); } -//______________________________________________________________________________ template< class E > inline Sequence< E >::~Sequence() SAL_THROW(()) { @@ -106,7 +100,6 @@ inline Sequence< E >::~Sequence() SAL_THROW(()) this, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release ); } -//______________________________________________________________________________ template< class E > 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; } -//______________________________________________________________________________ template< class E > inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const SAL_THROW(()) @@ -131,7 +123,6 @@ inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const (uno_ReleaseFunc)cpp_release ); } -//______________________________________________________________________________ template< class E > inline sal_Bool Sequence< E >::operator != ( const Sequence< E > & rSeq ) const SAL_THROW(()) @@ -139,7 +130,6 @@ inline sal_Bool Sequence< E >::operator != ( const Sequence< E > & rSeq ) const return (! operator == ( rSeq )); } -//______________________________________________________________________________ template< class E > inline E * Sequence< E >::getArray() { @@ -153,7 +143,16 @@ inline E * Sequence< E >::getArray() 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 > inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) { @@ -161,7 +160,6 @@ inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) return getArray()[ nIndex ]; } -//______________________________________________________________________________ template< class E > inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const SAL_THROW(()) @@ -170,7 +168,6 @@ inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const return reinterpret_cast< const E * >( _pSequence->elements )[ nIndex ]; } -//______________________________________________________________________________ template< class E > inline void Sequence< E >::realloc( sal_Int32 nSize ) { @@ -183,7 +180,6 @@ inline void Sequence< E >::realloc( sal_Int32 nSize ) throw ::std::bad_alloc(); } -//------------------------------------------------------------------------------ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( const ::rtl::ByteSequence & rByteSequence ) SAL_THROW(()) { diff --git a/include/comphelper/stlunosequence.hxx b/include/comphelper/stlunosequence.hxx deleted file mode 100644 index 1c61ed8dde3a..000000000000 --- a/include/comphelper/stlunosequence.hxx +++ /dev/null @@ -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: */ diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index 666943015987..080a4752dc87 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -69,7 +69,6 @@ #include "comphelper/mediadescriptor.hxx" #include "comphelper/processfactory.hxx" #include "comphelper/sequenceasvector.hxx" -#include "comphelper/stlunosequence.hxx" #include "comphelper/storagehelper.hxx" #include "cppuhelper/basemutex.hxx" #include "cppuhelper/compbase6.hxx" @@ -547,7 +546,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/solarmutex.hxx> #include <comphelper/stillreadwriteinteraction.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <comphelper/synchronousdispatch.hxx> diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 4859c0c54acc..614cb2690b85 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -66,7 +66,6 @@ #include "comphelper/storagehelper.hxx" #include "comphelper/mediadescriptor.hxx" #include "comphelper/sequenceasvector.hxx" -#include "comphelper/stlunosequence.hxx" #include "sot/storage.hxx" #include "sfx2/docfile.hxx" #include "sax/tools/converter.hxx" @@ -2306,9 +2305,7 @@ void SfxDocumentMetaData::createUserDefined() { const css::uno::Sequence<css::uno::Reference<css::uno::XInterface> > listeners(m_NotifyListeners.getElements()); - for (css::uno::Reference< css::uno::XInterface > const * iter = - ::comphelper::stl_begin(listeners); - iter != ::comphelper::stl_end(listeners); ++iter) { + for (css::uno::Reference< css::uno::XInterface > const * iter = listeners.begin(); iter != listeners.end(); ++iter) { xMB->addModifyListener( css::uno::Reference< css::util::XModifyListener >(*iter, css::uno::UNO_QUERY)); diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index c822621b6bd7..ed05375c09ac 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -24,7 +24,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/types.hxx> -#include <comphelper/stlunosequence.hxx> #include <rtl/ustrbuf.hxx> #include <tools/diagnose_ex.h> diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index 9ea07be1a223..b48b0d8fe47d 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -9,14 +9,12 @@ #include <SyncDbusSessionHelper.hxx> -#include <comphelper/stlunosequence.hxx> #include <gio/gio.h> #include <vector> #include <boost/shared_ptr.hpp> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -using namespace ::comphelper; using namespace ::std; using namespace ::rtl; @@ -71,7 +69,7 @@ namespace shell { namespace sessioninstall vector< OString > vPackagesOString; vPackagesOString.reserve(vPackages.getLength()); 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)); g_variant_builder_add(pBuilder.get(), "s", vPackagesOString.back().getStr()); diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx index 81ae0f650d03..9e1813fe6090 100644 --- a/svtools/inc/pch/precompiled_svt.hxx +++ b/svtools/inc/pch/precompiled_svt.hxx @@ -275,7 +275,6 @@ #include <comphelper/servicedecl.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/stl_types.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <comphelper/types.hxx> diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 5d9cde2825b9..3c135ebc2e1d 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/awt/grid/XGridColumnListener.hpp> #include <com/sun/star/awt/grid/XSortableGridData.hpp> -#include <comphelper/stlunosequence.hxx> #include <cppuhelper/weakref.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index 41648096fb42..1b7e754845e2 100644 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -28,7 +28,6 @@ #include <com/sun/star/view/SelectionType.hpp> #include <com/sun/star/awt/grid/XGridColumnListener.hpp> -#include <comphelper/stlunosequence.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx index 1089e66b99b4..fbfa48288c76 100644 --- a/sw/inc/pch/precompiled_msword.hxx +++ b/sw/inc/pch/precompiled_msword.hxx @@ -97,7 +97,6 @@ #include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <config_version.h> diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index cb79fff3672a..1285a3e2fdef 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -456,7 +456,6 @@ #include <comphelper/sequenceasvector.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/stl_types.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <comphelper/types.hxx> diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 33e782b6c80d..566f1ba2a215 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -68,7 +68,6 @@ // #i10825# #include <parachangetrackinginfo.hxx> #include <com/sun/star/text/TextMarkupType.hpp> -#include <comphelper/stlunosequence.hxx> #include <comphelper/servicehelper.hxx> #include <algorithm> @@ -1389,13 +1388,9 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( else { const OUString* aRequestedAttrIter = - ::std::find( ::comphelper::stl_begin( aRequestedAttributes ), - ::comphelper::stl_end( aRequestedAttributes ), - sMMToPixelRatio ); - if ( aRequestedAttrIter != ::comphelper::stl_end( aRequestedAttributes ) ) - { + ::std::find( aRequestedAttributes.begin(), aRequestedAttributes.end(), sMMToPixelRatio ); + if ( aRequestedAttrIter != aRequestedAttributes.end() ) bProvideMMToPixelRatio = true; - } } } diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx index 0a8fa9b96f0a..989c6f68f8e8 100644 --- a/sw/source/core/access/textmarkuphelper.cxx +++ b/sw/source/core/access/textmarkuphelper.cxx @@ -22,7 +22,6 @@ #include <vector> #include <algorithm> -#include <comphelper/stlunosequence.hxx> #include <com/sun/star/text/TextMarkupType.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( aTmpTextMarkups.size() ); - ::std::copy( aTmpTextMarkups.begin(), aTmpTextMarkups.end(), - ::comphelper::stl_begin( aTextMarkups ) ); + ::std::copy( aTmpTextMarkups.begin(), aTmpTextMarkups.end(), aTextMarkups.begin() ); return aTextMarkups; } diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 539cac40ef33..70712cc74072 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -22,7 +22,6 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> -#include <comphelper/stlunosequence.hxx> #include <SwXTextDefaults.hxx> #include <SwStyleNameMapper.hxx> @@ -251,7 +250,7 @@ sal_Bool SAL_CALL SwXTextDefaults::supportsService( const OUString& rServiceName throw (RuntimeException) { 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(); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index ec537447ab50..06b1b188eaba 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -85,7 +85,6 @@ #include <fmtline.hxx> #include <fmtfsize.hxx> #include <comphelper/extract.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/string.hxx> #include <doctok/sprmids.hxx> @@ -3673,7 +3672,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) { uno::Sequence< OUString > vListEntries; pListEntries->second >>= vListEntries; - copy(::comphelper::stl_begin(vListEntries), ::comphelper::stl_end(vListEntries), back_inserter(aListItems)); + copy(vListEntries.begin(), vListEntries.end(), back_inserter(aListItems)); } } diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 6e28911334d5..380e342d2309 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <comphelper/extract.hxx> -#include <comphelper/stlunosequence.hxx> #include <com/sun/star/beans/XPropertyContainer.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 ) { 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); sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0; (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(nIndex); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 853eabb8c1b2..b7f212153248 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -20,7 +20,6 @@ #include "defaultgriddatamodel.hxx" -#include <comphelper/stlunosequence.hxx> #include <comphelper/componentguard.hxx> #include <cppuhelper/supportsservice.hxx> #include <toolkit/helper/servicenames.hxx> @@ -46,9 +45,6 @@ namespace toolkit using ::com::sun::star::uno::Exception; using ::com::sun::star::util::XCloneable; - using ::comphelper::stl_begin; - using ::comphelper::stl_end; - //================================================================================================================== //= DefaultGridDataModel //================================================================================================================== @@ -190,7 +186,7 @@ namespace toolkit // create new data row RowData newRow( i_assumedColCount > 0 ? i_assumedColCount : i_rowData.getLength() ); 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; // insert data row @@ -349,8 +345,8 @@ namespace toolkit rDataRow[ columnIndex ].first = i_values[ col ]; } - sal_Int32 const firstAffectedColumn = *::std::min_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) ); - sal_Int32 const lastAffectedColumn = *::std::max_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( i_columnIndexes.begin(), i_columnIndexes.end() ); broadcast( GridDataEvent( *this, firstAffectedColumn, lastAffectedColumn, i_rowIndex, i_rowIndex ), &XGridDataListener::dataChanged, diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index e25514f3ca05..a595af43bb08 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -56,7 +56,6 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/supportsservice.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/sequenceasvector.hxx> #include <comphelper/makesequence.hxx> #include <comphelper/xmltools.hxx> @@ -1493,8 +1492,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } else { m_RDFaXHTMLContentSet.insert(sXmlId); } - ::std::for_each(::comphelper::stl_begin(i_rPredicates), - ::comphelper::stl_end(i_rPredicates), + ::std::for_each(i_rPredicates.begin(), i_rPredicates.end(), ::boost::bind( &librdf_Repository::addStatementGraph, this, i_xSubject, _1, xContent, xXmlId, true)); } diff --git a/writerfilter/inc/pch/precompiled_writerfilter.hxx b/writerfilter/inc/pch/precompiled_writerfilter.hxx index 5080248bf10d..9ae342eb5337 100644 --- a/writerfilter/inc/pch/precompiled_writerfilter.hxx +++ b/writerfilter/inc/pch/precompiled_writerfilter.hxx @@ -156,7 +156,6 @@ #include <comphelper/embeddedobjectcontainer.hxx> #include <comphelper/mediadescriptor.hxx> #include <comphelper/servicehelper.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <comphelper/types.hxx> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index aaea9e0a5713..4450a0b4840b 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -67,7 +67,6 @@ #include <map> -#include <comphelper/stlunosequence.hxx> #include <vcl/svapp.hxx> #include <vcl/outdev.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(); 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() ) rxFieldProps->setPropertyValue( "Items", uno::makeAny( sItems ) ); diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx index 851cdf4991d9..74df8fb6ab71 100644 --- a/writerfilter/source/dmapper/FormControlHelper.cxx +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -37,7 +37,6 @@ #include "FormControlHelper.hxx" #include <xmloff/odffields.hxx> -#include <comphelper/stlunosequence.hxx> namespace writerfilter { namespace dmapper { @@ -237,7 +236,7 @@ bool FormControlHelper::processField(uno::Reference<text::XFormField> xFormField xFormField->setFieldType(ODF_FORMDROPDOWN); uno::Sequence< OUString > sItems; 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 ( xNameCont->hasByName(ODF_FORMDROPDOWN_LISTENTRY) ) diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx index 3b0ba42c0fe6..744e54ea68ae 100644 --- a/xmloff/inc/pch/precompiled_xo.hxx +++ b/xmloff/inc/pch/precompiled_xo.hxx @@ -497,7 +497,6 @@ #include <comphelper/sequenceasvector.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/stl_types.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <comphelper/types.hxx> diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index 3b3097b60033..c14d5ae466f5 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -24,7 +24,6 @@ #include <xmloff/xmlexp.hxx> #include <xmloff/xmltoken.hxx> -#include <comphelper/stlunosequence.hxx> #include <comphelper/stl_types.hxx> #include <comphelper/processfactory.hxx> @@ -174,13 +173,12 @@ RDFaExportHelper::AddRDFa( OUStringBuffer property; ::comphelper::intersperse( - ::boost::make_transform_iterator( - ::comphelper::stl_begin(rStatements), + ::boost::make_transform_iterator(rStatements.begin(), ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), // argh, this must be the same type :( ::boost::make_transform_iterator( - ::comphelper::stl_end(rStatements), + rStatements.end(), ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), ::comphelper::OUStringBufferAppender(property), diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 245a7b2762a3..20349a6457bf 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -58,7 +58,6 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <txtlists.hxx> #include <xmloff/odffields.hxx> -#include <comphelper/stlunosequence.hxx> using ::com::sun::star::ucb::XAnyCompare; @@ -869,7 +868,7 @@ namespace if(!vListEntries.empty()) { 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); } for(::std::map<OUString, Any>::const_iterator pCurrent = vOutParams.begin(); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index bc9820944274..d8cb673efba9 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -98,7 +98,6 @@ #include "MultiPropertySetHelper.hxx" #include <xmloff/formlayerexport.hxx> #include "XMLTextCharStyleNamesElementExport.hxx" -#include <comphelper/stlunosequence.hxx> #include <xmloff/odffields.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> @@ -382,7 +381,7 @@ void FieldParamExporter::Export() const Type aSeqType = ::getCppuType((Sequence<OUString>*)0); const Type aIntType = ::getCppuType((sal_Int32*)0); 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 Type aValueType = aValue.getValueType(); @@ -423,7 +422,7 @@ void FieldParamExporter::Export() { Sequence<OUString> 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); } |