[Libreoffice-commits] core.git: basic/source chart2/source comphelper/source cui/source dbaccess/source forms/source framework/source linguistic/source oox/source package/source pyuno/source reportdesign/source scripting/source sc/source sd/source stoc/source svl/source svtools/source svx/source sw/source toolkit/source unotools/source vcl/unx writerfilter/source

Noel Grandin noel at peralex.com
Wed Nov 18 23:49:09 PST 2015


 basic/source/classes/propacc.cxx                                    |    6 -
 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx            |    2 
 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx            |    2 
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx   |    2 
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx |    2 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx         |    2 
 chart2/source/controller/chartapiwrapper/GridWrapper.cxx            |    2 
 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx          |    2 
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx      |    3 
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx           |    2 
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx       |    3 
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx       |    2 
 chart2/source/controller/dialogs/DialogModel.cxx                    |    7 +-
 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx         |    3 
 chart2/source/inc/ContainerHelper.hxx                               |   19 -----
 chart2/source/model/filter/XMLFilter.cxx                            |    5 -
 chart2/source/model/main/Axis.cxx                                   |    2 
 chart2/source/model/main/BaseCoordinateSystem.cxx                   |    4 -
 chart2/source/model/main/DataPoint.cxx                              |    2 
 chart2/source/model/main/DataSeries.cxx                             |   10 +--
 chart2/source/model/main/Diagram.cxx                                |    4 -
 chart2/source/model/main/FormattedString.cxx                        |    2 
 chart2/source/model/main/GridProperties.cxx                         |    2 
 chart2/source/model/main/Legend.cxx                                 |    2 
 chart2/source/model/main/PageBackground.cxx                         |    2 
 chart2/source/model/main/StockBar.cxx                               |    2 
 chart2/source/model/main/Title.cxx                                  |    2 
 chart2/source/model/main/Wall.cxx                                   |    2 
 chart2/source/model/template/AreaChartTypeTemplate.cxx              |    2 
 chart2/source/model/template/BarChartTypeTemplate.cxx               |    2 
 chart2/source/model/template/BubbleChartType.cxx                    |    2 
 chart2/source/model/template/BubbleChartTypeTemplate.cxx            |    2 
 chart2/source/model/template/BubbleDataInterpreter.cxx              |    4 -
 chart2/source/model/template/CandleStickChartType.cxx               |    6 -
 chart2/source/model/template/ChartType.cxx                          |    2 
 chart2/source/model/template/ChartTypeManager.cxx                   |    2 
 chart2/source/model/template/ChartTypeTemplate.cxx                  |    2 
 chart2/source/model/template/ColumnChartType.cxx                    |    2 
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx        |    2 
 chart2/source/model/template/DataInterpreter.cxx                    |    4 -
 chart2/source/model/template/LineChartType.cxx                      |    2 
 chart2/source/model/template/LineChartTypeTemplate.cxx              |    2 
 chart2/source/model/template/PieChartType.cxx                       |    2 
 chart2/source/model/template/PieChartTypeTemplate.cxx               |    2 
 chart2/source/model/template/ScatterChartType.cxx                   |    2 
 chart2/source/model/template/ScatterChartTypeTemplate.cxx           |    2 
 chart2/source/model/template/StockChartTypeTemplate.cxx             |    4 -
 chart2/source/model/template/XYDataInterpreter.cxx                  |    4 -
 chart2/source/tools/AxisHelper.cxx                                  |    5 -
 chart2/source/tools/CharacterProperties.cxx                         |    3 
 chart2/source/tools/ConfigColorScheme.cxx                           |    3 
 chart2/source/tools/DataSeriesHelper.cxx                            |    4 -
 chart2/source/tools/DataSourceHelper.cxx                            |   15 +---
 chart2/source/tools/DiagramHelper.cxx                               |    5 -
 chart2/source/tools/ErrorBar.cxx                                    |    2 
 chart2/source/tools/InternalDataProvider.cxx                        |   12 +--
 chart2/source/tools/OPropertySet.cxx                                |    3 
 chart2/source/tools/RangeHighlighter.cxx                            |    3 
 chart2/source/tools/RegressionCurveModel.cxx                        |    2 
 chart2/source/tools/RegressionEquation.cxx                          |    2 
 chart2/source/view/axes/VCoordinateSystem.cxx                       |    3 
 chart2/source/view/charttypes/VSeriesPlotter.cxx                    |    3 
 comphelper/source/misc/string.cxx                                   |    5 -
 cui/source/options/tsaurls.cxx                                      |    8 --
 dbaccess/source/core/dataaccess/connection.cxx                      |    4 -
 dbaccess/source/ui/app/AppController.cxx                            |    8 --
 dbaccess/source/ui/browser/unodatbr.cxx                             |    3 
 forms/source/component/ComboBox.cxx                                 |    8 --
 forms/source/component/Filter.cxx                                   |    3 
 forms/source/component/FormattedField.cxx                           |    4 -
 forms/source/component/refvaluecomponent.cxx                        |    4 -
 forms/source/misc/componenttools.cxx                                |    5 -
 forms/source/xforms/namedcollection.hxx                             |    7 --
 framework/source/classes/framecontainer.cxx                         |    7 --
 framework/source/uiconfiguration/imagemanagerimpl.cxx               |    5 -
 linguistic/source/dlistimp.cxx                                      |   10 ---
 oox/source/drawingml/customshapeproperties.cxx                      |    6 -
 oox/source/export/chartexport.cxx                                   |   18 +----
 oox/source/helper/grabbagstack.cxx                                  |   17 -----
 oox/source/vml/vmltextbox.cxx                                       |    7 --
 package/source/manifest/ManifestReader.cxx                          |    8 --
 package/source/zippackage/ZipPackage.cxx                            |   12 ---
 pyuno/source/module/pyuno_runtime.cxx                               |    7 --
 reportdesign/source/ui/inspection/GeometryHandler.cxx               |    3 
 sc/source/filter/excel/xltoolbar.cxx                                |   10 ---
 sc/source/ui/unoobj/chart2uno.cxx                                   |   33 +---------
 sc/source/ui/vba/vbaformatconditions.cxx                            |   11 ---
 scripting/source/vbaevents/eventhelper.cxx                          |    9 --
 sd/source/ui/framework/configuration/Configuration.cxx              |    7 --
 sd/source/ui/slideshow/slideshowimpl.cxx                            |    7 --
 sd/source/ui/unoidl/DrawController.cxx                              |    7 --
 stoc/source/implementationregistration/implreg.cxx                  |   15 ----
 stoc/source/servicemanager/servicemanager.cxx                       |   10 ---
 svl/source/passwordcontainer/passwordcontainer.cxx                  |   26 +------
 svl/source/passwordcontainer/syscreds.cxx                           |   15 ----
 svtools/source/misc/transfer.cxx                                    |   12 ---
 svx/source/form/fmPropBrw.cxx                                       |    6 -
 svx/source/unodraw/UnoNameItemTable.cxx                             |   14 ----
 svx/source/unodraw/UnoNamespaceMap.cxx                              |   14 ----
 svx/source/unodraw/unomtabl.cxx                                     |   14 ----
 sw/source/core/fields/flddropdown.cxx                               |   14 ----
 sw/source/core/unocore/unofield.cxx                                 |    9 --
 sw/source/core/unocore/unoflatpara.cxx                              |   11 ---
 sw/source/core/unocore/unoport.cxx                                  |   12 ---
 sw/source/filter/ww8/ww8toolbar.cxx                                 |    9 --
 toolkit/source/controls/unocontrols.cxx                             |    7 --
 unotools/source/misc/syslocale.cxx                                  |    6 -
 vcl/unx/kde/UnxCommandThread.cxx                                    |    8 --
 writerfilter/source/dmapper/MeasureHandler.cxx                      |    9 --
 writerfilter/source/dmapper/NumberingManager.cxx                    |   10 ---
 writerfilter/source/dmapper/SdtHelper.cxx                           |    5 -
 writerfilter/source/dmapper/StyleSheetTable.cxx                     |   19 -----
 112 files changed, 202 insertions(+), 503 deletions(-)

New commits:
commit 2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Nov 19 09:14:59 2015 +0200

    use comphelper::containerToSequence
    
    in chart2, we remove a local equivalent of the method
    
    Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100

diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index fa6a642..b43f8e7 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -25,6 +25,7 @@
 #include <sbunoobj.hxx>
 
 #include <comphelper/propertysetinfo.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <algorithm>
 #include <limits.h>
@@ -164,10 +165,7 @@ void SbPropertyValues::removeVetoableChangeListener(
 
 Sequence< PropertyValue > SbPropertyValues::getPropertyValues() throw (css::uno::RuntimeException, std::exception)
 {
-    Sequence<PropertyValue> aRet( m_aPropVals.size() );
-    for (size_t n = 0; n < m_aPropVals.size(); ++n)
-        aRet.getArray()[n] = m_aPropVals[n];
-    return aRet;
+    return comphelper::containerToSequence(m_aPropVals);
 }
 
 
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 80b551b..42f5d7f 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -62,7 +62,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index a064752..541c722 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -389,7 +389,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 495e8dc..0061161 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -257,7 +257,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index f48e6ef..c65defc 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -228,7 +228,7 @@ uno::Sequence< Property > lcl_GetPropertySequence( DataSeriesPointWrapper::eType
 
     ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() );
 
-    return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+    return comphelper::containerToSequence( aProperties );
 }
 
 struct StaticSeriesWrapperPropertyArray_Initializer
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index e38aaba..2ae296f 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -478,7 +478,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 5e994e2..6ce104f 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -64,7 +64,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 4b5b21f..8b77142 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -260,7 +260,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 7483e14..23d048f 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/chart2/XChartType.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <com/sun/star/drawing/LineJoint.hpp>
+#include <comphelper/sequence.hxx>
 
 #include "LinePropertiesHelper.hxx"
 #include "UserDefinedProperties.hxx"
@@ -82,7 +83,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 5fd664d..f2c46f5 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -184,7 +184,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 4928e5d..9921af6 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -26,6 +26,7 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/chart2/XChartType.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <comphelper/sequence.hxx>
 
 #include "LinePropertiesHelper.hxx"
 #include "FillProperties.hxx"
@@ -64,7 +65,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index 7be9d4e..5ae15ce 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -66,7 +66,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 4f356b9..9e3d0ae 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <com/sun/star/chart2/data/XDataSink.hpp>
+#include <comphelper/sequence.hxx>
 
 #include <rtl/ustring.hxx>
 
@@ -343,7 +344,7 @@ Reference< XDataSeries > lcl_CreateNewSeries(
                 aNewSequences.push_back( ::chart::DataSourceHelper::createLabeledDataSequence( xSeq ));
             }
 
-            xSink->setData( ContainerToSequence( aNewSequences ));
+            xSink->setData( comphelper::containerToSequence( aNewSequences ));
         }
     }
 
@@ -506,7 +507,7 @@ void addNewSeriesToContainer(
         ++aIt;
 
     aSeries.insert(aIt, xNewSeries);
-    xSeriesCnt->setDataSeries(ContainerToSequence(aSeries));
+    xSeriesCnt->setDataSeries(comphelper::containerToSequence(aSeries));
 }
 
 }
@@ -735,7 +736,7 @@ bool DialogModel::setData(
             applyInterpretedData(
                 xInterpreter->interpretDataSource(
                     xDataSource, rArguments,
-                    ContainerToSequence( aSeriesToReUse )),
+                    comphelper::containerToSequence( aSeriesToReUse )),
                 aSeriesToReUse,
                 true /* bSetStyles */);
 
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index de804c4..807fe68 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -34,6 +34,7 @@
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
+#include <comphelper/sequence.hxx>
 
 namespace chart
 {
@@ -146,7 +147,7 @@ uno::Sequence< uno::Type > CreationWizardUnoDlg::getTypes() throw(uno::RuntimeEx
         aTypes.push_back( cppu::UnoType<frame::XTerminateListener>::get() );
         aTypes.push_back( cppu::UnoType<ui::dialogs::XExecutableDialog>::get() );
         aTypes.push_back( cppu::UnoType<beans::XPropertySet>::get() );
-        aTypeList = ::chart::ContainerHelper::ContainerToSequence( aTypes );
+        aTypeList = comphelper::containerToSequence( aTypes );
     }
 
     return aTypeList;
diff --git a/chart2/source/inc/ContainerHelper.hxx b/chart2/source/inc/ContainerHelper.hxx
index 7c7284a..9f01b47 100644
--- a/chart2/source/inc/ContainerHelper.hxx
+++ b/chart2/source/inc/ContainerHelper.hxx
@@ -32,25 +32,6 @@ namespace chart
 namespace ContainerHelper
 {
 
-/** converts a standard container into a sequence of the same type
-
-    input:   standard container
-    output:  css::uno::Sequence< container::value_type >
-
-    example:
-
-    ::std::vector< sal_Int32 > aVector;
-    Sequence< sal_Int32 > aSequence( ContainerHelper::ContainerToSequence( aVector ));
- */
-template< class Container >
-    ::com::sun::star::uno::Sequence< typename Container::value_type >
-    ContainerToSequence( const Container & rCont )
-{
-    ::com::sun::star::uno::Sequence< typename Container::value_type > aResult( rCont.size());
-    ::std::copy( rCont.begin(), rCont.end(), aResult.getArray());
-    return aResult;
-}
-
 /** converts a UNO sequence into a standard "Sequence" container. For
     convenience see the methods SequenceToVector, etc. below.
 
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 1e06b3d..ba2746d 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -28,6 +28,7 @@
 #include <comphelper/propertysetinfo.hxx>
 #include <comphelper/documentconstants.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <sot/storage.hxx>
 #include <osl/diagnose.h>
@@ -117,7 +118,7 @@ uno::Reference< embed::XStorage > lcl_getWriteStorage(
                 else
                     aStorageArgs[0] <<= aMDHelper.URL;
                 aStorageArgs[1] <<= (embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE);
-                aStorageArgs[2] <<= ::chart::ContainerHelper::ContainerToSequence( aPropertiesForStorage );
+                aStorageArgs[2] <<= comphelper::containerToSequence( aPropertiesForStorage );
 
                 xStorage.set(
                     xStorageFact->createInstanceWithArguments( aStorageArgs ),
@@ -181,7 +182,7 @@ uno::Reference< embed::XStorage > lcl_getReadStorage(
             Sequence< uno::Any > aStorageArgs( 3 );
             aStorageArgs[0] <<= xStream;
             aStorageArgs[1] <<= (embed::ElementModes::READ | embed::ElementModes::NOCREATE);
-            aStorageArgs[2] <<= ::chart::ContainerHelper::ContainerToSequence( aPropertiesForStorage );
+            aStorageArgs[2] <<= comphelper::containerToSequence( aPropertiesForStorage );
             xStorage.set(
                 xStorageFact->createInstanceWithArguments( aStorageArgs ), uno::UNO_QUERY_THROW );
         }
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index b8040e7..10334a6 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -286,7 +286,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index ee431a8..63dfa28 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -95,7 +95,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
@@ -298,7 +298,7 @@ void SAL_CALL BaseCoordinateSystem::removeChartType( const Reference< chart2::XC
 Sequence< Reference< chart2::XChartType > > SAL_CALL BaseCoordinateSystem::getChartTypes()
     throw (uno::RuntimeException, std::exception)
 {
-    return ContainerHelper::ContainerToSequence( m_aChartTypes );
+    return comphelper::containerToSequence( m_aChartTypes );
 }
 
 void SAL_CALL BaseCoordinateSystem::setChartTypes( const Sequence< Reference< chart2::XChartType > >& aChartTypes )
diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx
index c775c5c..d3156a2 100644
--- a/chart2/source/model/main/DataPoint.cxx
+++ b/chart2/source/model/main/DataPoint.cxx
@@ -61,7 +61,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 3cf89fa..1a42a72 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -71,7 +71,7 @@ struct StaticDataSeriesInfoHelper : public rtl::StaticWithInit< ::cppu::OPropert
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
@@ -274,7 +274,7 @@ void SAL_CALL DataSeries::getFastPropertyValue
     // special handling for get.  set is not possible for this property
     if( nHandle == DataSeriesProperties::PROP_DATASERIES_ATTRIBUTED_DATA_POINTS )
     {
-        // ToDo: only add those property sets that are really modified
+        // TODO: only add those property sets that are really modified
         uno::Sequence< sal_Int32 > aSeq( m_aAttributedDataPoints.size());
         sal_Int32 * pIndexArray = aSeq.getArray();
         sal_Int32 i = 0;
@@ -331,7 +331,7 @@ Reference< beans::XPropertySet >
     Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences;
     {
         MutexGuard aGuard( GetMutex() );
-        aSequences = ContainerHelper::ContainerToSequence( m_aDataSequences );
+        aSequences = comphelper::containerToSequence( m_aDataSequences );
     }
 
     ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
@@ -440,7 +440,7 @@ Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSeries:
     throw (uno::RuntimeException, std::exception)
 {
     MutexGuard aGuard( GetMutex() );
-    return ContainerHelper::ContainerToSequence( m_aDataSequences );
+    return comphelper::containerToSequence( m_aDataSequences );
 }
 
 // ____ XRegressionCurveContainer ____
@@ -491,7 +491,7 @@ uno::Sequence< uno::Reference< chart2::XRegressionCurve > > SAL_CALL DataSeries:
     throw (uno::RuntimeException, std::exception)
 {
     MutexGuard aGuard( GetMutex() );
-    return ContainerHelper::ContainerToSequence( m_aRegressionCurves );
+    return comphelper::containerToSequence( m_aRegressionCurves );
 }
 
 void SAL_CALL DataSeries::setRegressionCurves(
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 9f95cee..b0e5c0b 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -250,7 +250,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
@@ -561,7 +561,7 @@ uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > SAL_CALL Diagram::g
     throw (uno::RuntimeException, std::exception)
 {
     MutexGuard aGuard( GetMutex() );
-    return ContainerHelper::ContainerToSequence( m_aCoordSystems );
+    return comphelper::containerToSequence( m_aCoordSystems );
 }
 
 void SAL_CALL Diagram::setCoordinateSystems(
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index f30eb31..13b54ad 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -73,7 +73,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx
index 5aa3f35..7eb1350 100644
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -101,7 +101,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index 9d22b6e..1528dfc 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -157,7 +157,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index ab3ceb0..295dd0a 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -86,7 +86,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx
index 0b05ee0..347b83f 100644
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -60,7 +60,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 653abe4..20300b2 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -204,7 +204,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx
index ef1b9e3..80093ed 100644
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -88,7 +88,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx
index 1537c3f..da3770d 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.cxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx
@@ -92,7 +92,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx
index 190ed23..d18f899 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -100,7 +100,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/BubbleChartType.cxx b/chart2/source/model/template/BubbleChartType.cxx
index 4b494b7..b732c64 100644
--- a/chart2/source/model/template/BubbleChartType.cxx
+++ b/chart2/source/model/template/BubbleChartType.cxx
@@ -70,7 +70,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index 0f4276d..9e4fcac 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -72,7 +72,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx
index f9e4d25..2465041 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -149,13 +149,13 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
         OSL_ASSERT( xSeries.is() );
         Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
         OSL_ASSERT( xSink.is() );
-        xSink->setData( ContainerHelper::ContainerToSequence( aNewData ) );
+        xSink->setData( comphelper::containerToSequence( aNewData ) );
 
         aSeriesVec.push_back( xSeries );
     }
 
     Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
-    aSeries[0] = ContainerHelper::ContainerToSequence( aSeriesVec );
+    aSeries[0] = comphelper::containerToSequence( aSeriesVec );
     return InterpretedData( aSeries, xCategories );
 }
 
diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx
index 1d46372..e4125fb 100644
--- a/chart2/source/model/template/CandleStickChartType.cxx
+++ b/chart2/source/model/template/CandleStickChartType.cxx
@@ -123,7 +123,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
@@ -243,7 +243,7 @@ uno::Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedMandatoryRo
 
     aMandRoles.push_back( "values-last");
 
-    return ContainerHelper::ContainerToSequence( aMandRoles );
+    return comphelper::containerToSequence( aMandRoles );
 }
 
 Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles()
@@ -265,7 +265,7 @@ Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles()
         aOptRoles.push_back( "values-max");
     }
 
-    return ContainerHelper::ContainerToSequence( aOptRoles );
+    return comphelper::containerToSequence( aOptRoles );
 }
 
 OUString SAL_CALL CandleStickChartType::getRoleOfSequenceForSeriesLabel()
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 9ab9722..bd61628 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -183,7 +183,7 @@ Sequence< Reference< chart2::XDataSeries > > SAL_CALL ChartType::getDataSeries()
 {
     SolarMutexGuard g;
 
-    return ContainerHelper::ContainerToSequence( m_aDataSeries );
+    return comphelper::containerToSequence( m_aDataSeries );
 }
 
 void SAL_CALL ChartType::setDataSeries( const Sequence< Reference< chart2::XDataSeries > >& aDataSeries )
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index ad12cac..adee48e 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -600,7 +600,7 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames()
         }
     }
 
-    return ContainerHelper::ContainerToSequence( aServices );
+    return comphelper::containerToSequence( aServices );
 }
 
 // ____ XServiceInfo ____
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 2fb754b..9076b8f 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -274,7 +274,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData(
     {
         // interpret new data and re-use existing series
         Sequence< Reference< XDataSeries > > aFlatSeriesSeq(
-            ::chart::ContainerHelper::ContainerToSequence( DiagramHelper::getDataSeriesFromDiagram( xDiagram )));
+            comphelper::containerToSequence( DiagramHelper::getDataSeriesFromDiagram( xDiagram )));
         const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.getLength();
         Reference< chart2::XDataInterpreter > xInterpreter( getDataInterpreter());
         chart2::InterpretedData aData =
diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx
index f11b2a1..c60b08b 100644
--- a/chart2/source/model/template/ColumnChartType.cxx
+++ b/chart2/source/model/template/ColumnChartType.cxx
@@ -98,7 +98,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index 7f36308..25f0cc1 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -97,7 +97,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 9cc8c8e..18487e8 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -132,7 +132,7 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
     }
 
     Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
-    aSeries[0] = ContainerToSequence( aSeriesVec );
+    aSeries[0] = comphelper::containerToSequence( aSeriesVec );
     return InterpretedData( aSeries, xCategories );
 }
 
@@ -308,7 +308,7 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
         }
     }
 
-    return Reference< data::XDataSource >( DataSourceHelper::createDataSource( ContainerToSequence( aResultVec ) ) );
+    return Reference< data::XDataSource >( DataSourceHelper::createDataSource( comphelper::containerToSequence( aResultVec ) ) );
 }
 
 // convenience methods
diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx
index 553dce4..3c9e8ac 100644
--- a/chart2/source/model/template/LineChartType.cxx
+++ b/chart2/source/model/template/LineChartType.cxx
@@ -111,7 +111,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx
index 42441a7..8c61751 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -116,7 +116,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx
index 2a6ebf6..f036ebc 100644
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -99,7 +99,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 3385df7..6fc096a 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -125,7 +125,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx
index 106f88f..83e23e3 100644
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -115,7 +115,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index 35f974d..1c675c9 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -118,7 +118,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 0e28bf7..88a51fc 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -127,7 +127,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
@@ -394,7 +394,7 @@ void StockChartTypeTemplate::createChartTypes(
         }
 
         Reference< XChartTypeContainer > xCTCnt( rCoordSys[ 0 ], uno::UNO_QUERY_THROW );
-        xCTCnt->setChartTypes( ::chart::ContainerHelper::ContainerToSequence(aChartTypeVec) );
+        xCTCnt->setChartTypes( comphelper::containerToSequence(aChartTypeVec) );
     }
     catch( const uno::Exception & ex )
     {
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx
index 33175a4..a30a445 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -133,13 +133,13 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
         OSL_ASSERT( xSeries.is() );
         Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
         OSL_ASSERT( xSink.is() );
-        xSink->setData( ContainerHelper::ContainerToSequence( aNewData ) );
+        xSink->setData( comphelper::containerToSequence( aNewData ) );
 
         aSeriesVec.push_back( xSeries );
     }
 
     Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
-    aSeries[0] = ContainerHelper::ContainerToSequence( aSeriesVec );
+    aSeries[0] = comphelper::containerToSequence( aSeriesVec );
     return InterpretedData( aSeries, xCategories );
 }
 
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 140b523..8917194 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -45,6 +45,7 @@
 
 #include <com/sun/star/util/XCloneable.hpp>
 #include <com/sun/star/lang/XServiceName.hpp>
+#include <comphelper/sequence.hxx>
 
 #include <map>
 
@@ -870,7 +871,7 @@ Sequence< Reference< XAxis > > AxisHelper::getAllAxesOfDiagram(
         }
     }
 
-    return ContainerHelper::ContainerToSequence( aAxisVector );
+    return comphelper::containerToSequence( aAxisVector );
 }
 
 Sequence< Reference< beans::XPropertySet > > AxisHelper::getAllGrids( const Reference< XDiagram >& xDiagram )
@@ -898,7 +899,7 @@ Sequence< Reference< beans::XPropertySet > > AxisHelper::getAllGrids( const Refe
         }
     }
 
-    return ContainerHelper::ContainerToSequence( aGridVector );
+    return comphelper::containerToSequence( aGridVector );
 }
 
 void AxisHelper::getAxisOrGridPossibilities( Sequence< sal_Bool >& rPossibilityList
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index b10b5c7..cdc4de6 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -40,6 +40,7 @@
 #include <com/sun/star/i18n/ScriptType.hpp>
 
 #include <comphelper/InlineContainer.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <unotools/lingucfg.hxx>
 #include <i18nlangtag/mslangid.hxx>
@@ -490,7 +491,7 @@ awt::FontDescriptor CharacterProperties::createFontDescriptorFromPropertySet(
         ( "CharWordMode")                    // WordLineMode
         ;
 
-    uno::Sequence< OUString > aPropNameSeq( ContainerHelper::ContainerToSequence( aPropNames ));
+    uno::Sequence< OUString > aPropNameSeq( comphelper::containerToSequence( aPropNames ));
     uno::Sequence< uno::Any > aValues( xMultiPropSet->getPropertyValues( aPropNameSeq ));
 
     sal_Int32 i=0;
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 51fb7cd..69ddf39 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -24,6 +24,7 @@
 #include <unotools/configitem.hxx>
 #include <sal/macros.h>
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <set>
 
@@ -88,7 +89,7 @@ void ChartConfigItem::ImplCommit()
 void ChartConfigItem::addPropertyNotification( const OUString & rPropertyName )
 {
     m_aPropertiesToNotify.insert( rPropertyName );
-    EnableNotification( ContainerHelper::ContainerToSequence( m_aPropertiesToNotify ));
+    EnableNotification( comphelper::containerToSequence<OUString>( m_aPropertiesToNotify ));
 }
 
 uno::Any ChartConfigItem::getProperty( const OUString & aPropertyName )
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index eea642e..e668ccb 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -260,7 +260,7 @@ Reference< chart2::data::XDataSource >
     getDataSource( const Sequence< Reference< chart2::XDataSeries > > & aSeries )
 {
     return Reference< chart2::data::XDataSource >(
-        new DataSource(ContainerHelper::ContainerToSequence(getAllDataSequences(aSeries))));
+        new DataSource(comphelper::containerToSequence(getAllDataSequences(aSeries))));
 }
 
 namespace
@@ -529,7 +529,7 @@ void deleteSeries(
         if( aIt != aSeries.end())
         {
             aSeries.erase( aIt );
-            xSeriesCnt->setDataSeries( ContainerHelper::ContainerToSequence( aSeries ));
+            xSeriesCnt->setDataSeries( comphelper::containerToSequence( aSeries ));
         }
     }
     catch( const uno::Exception & ex )
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 0afe27e..3413e1a 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -243,7 +243,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
 
     ::std::vector< Reference< chart2::XDataSeries > > xSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
     uno::Reference< chart2::data::XDataSource > xSeriesSource(
-        DataSeriesHelper::getDataSource( ContainerHelper::ContainerToSequence(xSeriesVector) ) );
+        DataSeriesHelper::getDataSource( comphelper::containerToSequence(xSeriesVector) ) );
     Sequence< Reference< chart2::data::XLabeledDataSequence > > aDataSeqences( xSeriesSource->getDataSequences() );
 
     //the first x-values is always the next sequence //todo ... other x-values get lost for old format
@@ -260,10 +260,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
             aResultVector.push_back( aDataSeqences[nN] );
     }
 
-    Sequence< Reference< chart2::data::XLabeledDataSequence > > aResultSequence( aResultVector.size() );
-    ::std::copy( aResultVector.begin(), aResultVector.end(), aResultSequence.getArray() );
-
-    return new DataSource( aResultSequence );
+    return new DataSource( comphelper::containerToSequence(aResultVector) );
 }
 
 uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges(
@@ -287,7 +284,7 @@ uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges(
         }
     }
 
-    return ContainerHelper::ContainerToSequence( aResult );
+    return comphelper::containerToSequence( aResult );
 }
 
 uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges( const uno::Reference< frame::XModel > & xChartModel )
@@ -325,7 +322,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
     }
 
     return uno::Reference< chart2::data::XDataSource >(
-        new DataSource( ContainerHelper::ContainerToSequence( aResult )));
+        new DataSource( comphelper::containerToSequence( aResult )));
 }
 
 uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
@@ -351,7 +348,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
     }
 
     return uno::Reference< chart2::data::XDataSource >(
-        new DataSource( ContainerHelper::ContainerToSequence( aResult )));
+        new DataSource( comphelper::containerToSequence( aResult )));
 }
 
 bool DataSourceHelper::detectRangeSegmentation(
@@ -537,7 +534,7 @@ Sequence< OUString > DataSourceHelper::getRangesFromDataSource( const Reference<
                 aResult.push_back( xValues->getSourceRangeRepresentation());
         }
     }
-    return ContainerHelper::ContainerToSequence( aResult );
+    return comphelper::containerToSequence( aResult );
 }
 
 } //namespace chart
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index c38e6d2..9a66d53 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -58,6 +58,7 @@
 #include <svl/zformat.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
+#include <comphelper/sequence.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
@@ -753,7 +754,7 @@ Sequence< Sequence< Reference< XDataSeries > > >
             }
         }
     }
-    return ContainerHelper::ContainerToSequence( aResult );
+    return comphelper::containerToSequence( aResult );
 }
 
 Reference< XChartType >
@@ -1266,7 +1267,7 @@ Sequence< Reference< XChartType > >
         }
     }
 
-    return ContainerHelper::ContainerToSequence( aResult );
+    return comphelper::containerToSequence( aResult );
 }
 
 bool DiagramHelper::areChartTypesCompatible( const Reference< ::chart2::XChartType >& xFirstType,
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index c22e592..29b866f 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -440,7 +440,7 @@ void SAL_CALL ErrorBar::setData( const uno::Sequence< uno::Reference< chart2::da
 uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ErrorBar::getDataSequences()
     throw (uno::RuntimeException, std::exception)
 {
-    return ContainerHelper::ContainerToSequence( m_aDataSequences );
+    return comphelper::containerToSequence( m_aDataSequences );
 }
 
 uno::Sequence< OUString > ErrorBar::getSupportedServiceNames_Static()
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 7ff00f1..4f68d0b 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -720,7 +720,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
                         , lcl_aCategoriesRoleName ) ) );
         }
         //don't add the created sequences to the map as they are used temporarily only ...
-        return new DataSource( ContainerHelper::ContainerToSequence(aComplexCategories) );
+        return new DataSource( comphelper::containerToSequence(aComplexCategories) );
     }
 
     OSL_ASSERT( aRangeRepresentation == lcl_aCompleteRange );
@@ -772,7 +772,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
             aResultLSeqVec.push_back( *aIt );
     }
 
-    return new DataSource( ContainerHelper::ContainerToSequence(aResultLSeqVec) );
+    return new DataSource( comphelper::containerToSequence(aResultLSeqVec) );
 }
 
 Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments(
@@ -893,7 +893,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
             ? m_aInternalData.getComplexColumnLabel( nIndex )
             : m_aInternalData.getComplexRowLabel( nIndex );
         if( !aComplexLabel.empty() )
-            aResult = ContainerHelper::ContainerToSequence(aComplexLabel);
+            aResult = comphelper::containerToSequence(aComplexLabel);
     }
     else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
     {
@@ -902,7 +902,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
             ? m_aInternalData.getComplexRowLabel( nPointIndex )
             : m_aInternalData.getComplexColumnLabel( nPointIndex );
         if( !aComplexCategory.empty() )
-            aResult = ContainerHelper::ContainerToSequence(aComplexCategory);
+            aResult = comphelper::containerToSequence(aComplexCategory);
     }
     else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
     {
@@ -1305,7 +1305,7 @@ Sequence< Sequence< Type > > lcl_convertVectorVectorToSequenceSequence( const ve
     {
         aRet.realloc(nOuterCount);
         for( sal_Int32 nN=0; nN<nOuterCount; nN++)
-            aRet[nN]= ContainerHelper::ContainerToSequence( rIn[nN] );
+            aRet[nN]= comphelper::containerToSequence( rIn[nN] );
     }
     return aRet;
 }
@@ -1332,7 +1332,7 @@ Sequence< Sequence< OUString > > lcl_convertComplexAnyVectorToStringSequence( co
     {
         aRet.realloc(nOuterCount);
         for( sal_Int32 nN=0; nN<nOuterCount; nN++)
-            aRet[nN]= lcl_AnyToStringSequence( ContainerHelper::ContainerToSequence( rIn[nN] ) );
+            aRet[nN]= lcl_AnyToStringSequence( comphelper::containerToSequence( rIn[nN] ) );
     }
     return aRet;
 }
diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx
index a64d893..4c00807 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -22,6 +22,7 @@
 #include "ContainerHelper.hxx"
 #include <cppuhelper/queryinterface.hxx>
 #include <comphelper/servicehelper.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <vector>
 #include <algorithm>
@@ -111,7 +112,7 @@ Sequence< uno::Type > SAL_CALL
         aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XMultiPropertyStates ));
         aTypes.push_back( LCL_PROP_CPPUTYPE( XStyleSupplier ));
 
-        aTypeList = ::chart::ContainerHelper::ContainerToSequence( aTypes );
+        aTypeList = comphelper::containerToSequence( aTypes );
     }
 
     return aTypeList;
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index 40a7e43..654f30a 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/chart2/XDataSeries.hpp>
 #include <com/sun/star/chart/ErrorBarStyle.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
+#include <comphelper/sequence.hxx>
 
 #define PREFERED_DEFAULT_COLOR 0x0000ff
 
@@ -292,7 +293,7 @@ void RangeHighlighter::fillRangesForDataPoint( const Reference< uno::XInterface
                             nPreferredColor,
                             sal_False ));
             }
-            m_aSelectedRanges = ContainerHelper::ContainerToSequence( aHilightedRanges );
+            m_aSelectedRanges = comphelper::containerToSequence( aHilightedRanges );
         }
     }
 }
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index 6857be4..dfafae4 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -156,7 +156,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 };
 
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index 35ca0c88..5d3633c 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -152,7 +152,7 @@ private:
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
 
-        return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+        return comphelper::containerToSequence( aProperties );
     }
 
 };
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 5a16b80..fc03e33 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -38,6 +38,7 @@
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <comphelper/sequence.hxx>
 
 #include <rtl/math.hxx>
 
@@ -218,7 +219,7 @@ Sequence< Reference< beans::XPropertySet > > VCoordinateSystem::getGridListFromA
         aRet.insert( aRet.end(), aSubGrids.begin(), aSubGrids.end() );
     }
 
-    return ContainerHelper::ContainerToSequence( aRet );
+    return comphelper::containerToSequence( aRet );
 }
 
 void VCoordinateSystem::impl_adjustDimension( sal_Int32& rDimensionIndex )
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 164d2fd..4ed9bdc 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -78,6 +78,7 @@
 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
 
 #include <svx/unoshape.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <functional>
 #include <map>
@@ -2063,7 +2064,7 @@ uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
             }
         }
     }
-    return ContainerHelper::ContainerToSequence( aRetVector );
+    return comphelper::containerToSequence( aRetVector );
 }
 
 namespace
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index 8384e73..aee1cd0 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -33,6 +33,7 @@
 
 #include <comphelper/string.hxx>
 #include <comphelper/stl_types.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <com/sun/star/i18n/BreakIterator.hpp>
 #include <com/sun/star/i18n/CharType.hpp>
@@ -265,9 +266,7 @@ uno::Sequence< OUString >
           vec.push_back(kw);
       }
     } while (idx >= 0);
-    uno::Sequence< OUString > kws(vec.size());
-    std::copy(vec.begin(), vec.end(), kws.begin());
-    return kws;
+    return comphelper::containerToSequence(vec);
 }
 
 OString join(const OString& rSeparator, const std::vector<OString>& rSequence)
diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx
index b5b0988..d812f37 100644
--- a/cui/source/options/tsaurls.cxx
+++ b/cui/source/options/tsaurls.cxx
@@ -10,6 +10,7 @@
 #include <officecfg/Office/Common.hxx>
 #include <svx/svxdlg.hxx>
 #include <cuires.hrc>
+#include <comphelper/sequence.hxx>
 
 #include "tsaurls.hxx"
 
@@ -52,12 +53,7 @@ IMPL_LINK_NOARG_TYPED(TSAURLsDialog, OKHdl_Impl, Button*, void)
 {
     std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
 
-    css::uno::Sequence<OUString> aNewValue(m_aURLs.size());
-    size_t n(0);
-
-    for (auto i = m_aURLs.cbegin(); i != m_aURLs.cend(); ++i)
-        aNewValue[n++] = *i;
-    officecfg::Office::Common::Security::Scripting::TSAURLs::set(aNewValue, batch);
+    officecfg::Office::Common::Security::Scripting::TSAURLs::set(comphelper::containerToSequence<OUString>(m_aURLs), batch);
     batch->commit();
 
     EndDialog(RET_OK);
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 3589548..1689563 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -412,9 +412,7 @@ Sequence< Type > OConnection::getTypes() throw (RuntimeException, std::exception
     if ( !m_bSupportsGroups )
         aNormalizedTypes.erase( cppu::UnoType<XGroupsSupplier>::get() );
 
-    Sequence< Type > aSupportedTypes( aNormalizedTypes.size() );
-    ::std::copy( aNormalizedTypes.begin(), aNormalizedTypes.end(), aSupportedTypes.getArray() );
-    return aSupportedTypes;
+    return comphelper::containerToSequence<Type>(aNormalizedTypes);
 }
 
 Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException, std::exception)
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 4fca0c8..01a8f94 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1706,9 +1706,7 @@ bool OApplicationController::onContainerSelect(ElementType _eType)
         SelectionByElementType::iterator pendingSelection = m_aPendingSelection.find( _eType );
         if ( pendingSelection != m_aPendingSelection.end() )
         {
-            Sequence< OUString > aSelected( pendingSelection->second.size() );
-            ::std::copy( pendingSelection->second.begin(), pendingSelection->second.end(), aSelected.getArray() );
-            getContainer()->selectElements( aSelected );
+            getContainer()->selectElements( comphelper::containerToSequence(pendingSelection->second) );
 
             m_aPendingSelection.erase( pendingSelection );
         }
@@ -2861,9 +2859,7 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw
     {
         if ( sel->first == m_eCurrentType )
         {
-            Sequence< OUString > aSelected( sel->second.size() );
-            ::std::copy( sel->second.begin(), sel->second.end(), aSelected.getArray() );
-            getContainer()->selectElements( aSelected );
+            getContainer()->selectElements( comphelper::containerToSequence(sel->second) );
         }
         else
         {
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 3d235aa..eba3487 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -552,8 +552,7 @@ bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_f
 
         ::std::vector< OUString > aNames( aPropertyValues.getNames() );
         ::std::sort(aNames.begin(), aNames.end());
-        Sequence< OUString > aPropNames( aNames.size() );
-        ::std::copy( aNames.begin(), aNames.end(), aPropNames.getArray() );
+        Sequence< OUString > aPropNames( comphelper::containerToSequence(aNames) );
 
         Sequence< Any > aPropValues( aNames.size() );
         ::std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName( aPropertyValues ) );
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index bbb7da0..eb636fb 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -659,14 +659,8 @@ void OComboBoxModel::loadData( bool _bForce )
         return;
     }
 
-    // Create css::uno::Sequence<OUString> for ListBox
-    css::uno::Sequence<OUString> aStringSeq(aStringList.size());
-    OUString* pStringAry = aStringSeq.getArray();
-    for (sal_Int32 i = 0; i<aStringSeq.getLength(); ++i)
-        pStringAry[i] = aStringList[i];
-
     // Set String-Sequence at ListBox
-    setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringSeq ) );
+    setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( comphelper::containerToSequence(aStringList) ) );
 }
 
 
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index e23009b..5cb32bd 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -466,8 +466,7 @@ namespace frm
             }
 
             // fill the list items into our peer
-            Sequence< OUString> aStringSeq( aProposals.size() );
-            ::std::copy( aProposals.begin(), aProposals.end(), aStringSeq.getArray() );
+            Sequence< OUString> aStringSeq( comphelper::containerToSequence(aProposals) );
 
             const Reference< XComboBox >  xComboBox( getPeer(), UNO_QUERY_THROW );
             xComboBox->addItems( aStringSeq, 0 );
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index f27f31e..614875d 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -1019,9 +1019,7 @@ Sequence< Type > OFormattedModel::getSupportedBindingTypes()
         aTypes.push_front(cppu::UnoType< sal_Bool >::get() );
         break;
     }
-    Sequence< Type > aTypesRet( aTypes.size() );
-    ::std::copy( aTypes.begin(), aTypes.end(), aTypesRet.getArray() );
-    return aTypesRet;
+    return comphelper::containerToSequence<Type>(aTypes);
 }
 
 Any OFormattedModel::getDefaultForReset() const
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index 0be4706..c1d6ae8 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -177,9 +177,7 @@ namespace frm
             aTypes.push_front( cppu::UnoType<OUString>::get() );
             // push_front, because this is the preferred type
 
-        Sequence< Type > aTypesRet( aTypes.size() );
-        ::std::copy( aTypes.begin(), aTypes.end(), aTypesRet.getArray() );
-        return aTypesRet;
+        return comphelper::containerToSequence<Type>(aTypes);
     }
 
 
diff --git a/forms/source/misc/componenttools.cxx b/forms/source/misc/componenttools.cxx
index add35d5..13a1ed7 100644
--- a/forms/source/misc/componenttools.cxx
+++ b/forms/source/misc/componenttools.cxx
@@ -20,6 +20,7 @@
 #include "componenttools.hxx"
 
 #include <com/sun/star/container/XChild.hpp>
+#include <comphelper/sequence.hxx>
 
 #include <algorithm>
 #include <iterator>
@@ -80,9 +81,7 @@ namespace frm
 
     TypeBag::TypeSequence TypeBag::getTypes() const
     {
-        TypeSequence aTypes( m_aTypes.size() );
-        ::std::copy( m_aTypes.begin(), m_aTypes.end(), aTypes.getArray() );
-        return aTypes;
+        return comphelper::containerToSequence<css::uno::Type>(m_aTypes);
     }
 
 
diff --git a/forms/source/xforms/namedcollection.hxx b/forms/source/xforms/namedcollection.hxx
index ec10c91..1c53ad9 100644
--- a/forms/source/xforms/namedcollection.hxx
+++ b/forms/source/xforms/namedcollection.hxx
@@ -64,12 +64,7 @@ public:
                 aNames.push_back( xNamed->getName() );
         }
 
-        // copy names to Sequence and return
-        css::uno::Sequence<OUString> aResult( aNames.size() );
-        OUString* pStrings = aResult.getArray();
-        std::copy( aNames.begin(), aNames.end(), pStrings );
-
-        return aResult;
+        return comphelper::containerToSequence(aNames);
     }
 
 protected:
diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx
index 1eea3b3..dd18ea5 100644
--- a/framework/source/classes/framecontainer.cxx
+++ b/framework/source/classes/framecontainer.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
 
 #include <vcl/svapp.hxx>
+#include <comphelper/sequence.hxx>
 
 namespace framework{
 
@@ -186,11 +187,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::operator[]( sal_uInt32
 css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > FrameContainer::getAllElements() const
 {
     SolarMutexGuard g;
-    sal_Int32                                                       nPosition = 0;
-    css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > lElements ( (sal_uInt32)m_aContainer.size() );
-    for (TFrameContainer::const_iterator pItem=m_aContainer.begin(); pItem!=m_aContainer.end(); ++pItem)
-        lElements[nPosition++] = *pItem;
-    return lElements;
+    return comphelper::containerToSequence(m_aContainer);
 }
 
 /**-***************************************************************************************************************
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index b7f271a..e62a7a7 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -751,10 +751,7 @@ throw (css::uno::RuntimeException, lang::IllegalAccessException)
         ImageList* pImageList = implts_getUserImageList( ImageType(i));
         pImageList->GetImageNames( aUserImageNames );
 
-        Sequence< OUString > aRemoveList( aUserImageNames.size() );
-        const sal_uInt32 nCount = aUserImageNames.size();
-        for ( sal_uInt32 j = 0; j < nCount; j++ )
-            aRemoveList[j] = aUserImageNames[j];
+        Sequence< OUString > aRemoveList( comphelper::containerToSequence(aUserImageNames) );
 
         // Remove images
         removeImages( sal_Int16( i ), aRemoveList );
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 15ed050..525da70 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -28,6 +28,7 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <unotools/localfilehelper.hxx>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/lang/Locale.hpp>
@@ -404,14 +405,7 @@ uno::Sequence< uno::Reference< XDictionary > > SAL_CALL
 
     DictionaryVec_t& rDicList = GetOrCreateDicList();
 
-    uno::Sequence< uno::Reference< XDictionary > > aDics( rDicList.size() );
-    uno::Reference< XDictionary > *pDic = aDics.getArray();
-
-    sal_Int32 n = (sal_uInt16) aDics.getLength();
-    for (sal_Int32 i = 0;  i < n;  i++)
-        pDic[i] = rDicList[i];
-
-    return aDics;
+    return comphelper::containerToSequence(rDicList);
 }
 
 uno::Reference< XDictionary > SAL_CALL
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index cb40b1f..19fbc61 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
 #include <osl/diagnose.h>
+#include <comphelper/sequence.hxx>
 
 using namespace ::oox::core;
 using namespace ::com::sun::star;
@@ -258,10 +259,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
 
         PropertyMap aPath;
 
-        Sequence< EnhancedCustomShapeSegment > aSegments( maSegments.size() );
-        for ( i = 0; i < maSegments.size(); i++ )
-            aSegments[ i ] = maSegments[ i ];
-        aPath.setProperty( PROP_Segments, aSegments);
+        aPath.setProperty( PROP_Segments, comphelper::containerToSequence(maSegments) );
 
         if ( maTextRect.has() ) {
             Sequence< EnhancedCustomShapeTextFrame > aTextFrames(1);
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 19ff780..14e49a8 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -87,6 +87,7 @@
 
 #include <comphelper/processfactory.hxx>
 #include <comphelper/random.hxx>
+#include <comphelper/sequence.hxx>
 #include <xmloff/SchXMLSeriesHelper.hxx>
 #include "ColorPropertySet.hxx"
 #include <set>
@@ -207,16 +208,15 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
 }
 
 Reference< chart2::data::XDataSource > lcl_createDataSource(
-    const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aData )
+    const std::vector< Reference< chart2::data::XLabeledDataSequence > > & aData )
 {
-    Reference< uno::XComponentContext > xContext(
-        comphelper::getProcessComponentContext() );
+    Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
     Reference< chart2::data::XDataSink > xSink(
         xContext->getServiceManager()->createInstanceWithContext(
             "com.sun.star.chart2.data.DataSource", xContext ),
         uno::UNO_QUERY_THROW );
     if( xSink.is())
-        xSink->setData( aData );
+        xSink->setData( comphelper::containerToSequence(aData) );
 
     return Reference< chart2::data::XDataSource >( xSink, uno::UNO_QUERY );
 }
@@ -239,10 +239,7 @@ Sequence< Reference< chart2::data::XLabeledDataSequence > > lcl_getAllSeriesSequ
         }
     }
 
-    Sequence< Reference< chart2::data::XLabeledDataSequence > > aRet( aContainer.size());
-    ::std::copy( aContainer.begin(), aContainer.end(), aRet.getArray());
-
-    return aRet;
+    return comphelper::containerToSequence(aContainer);
 }
 
 Reference< chart2::data::XLabeledDataSequence >
@@ -291,10 +288,7 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
             aLabeledSeqVector.push_back( aSeriesSeqVector[nN] );
     }
 
-    Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( aLabeledSeqVector.size() );
-    ::std::copy( aLabeledSeqVector.begin(), aLabeledSeqVector.end(), aSeq.getArray() );
-
-    return lcl_createDataSource( aSeq );
+    return lcl_createDataSource( aLabeledSeqVector );
 }
 
 bool lcl_isSeriesAttachedToFirstAxis(
diff --git a/oox/source/helper/grabbagstack.cxx b/oox/source/helper/grabbagstack.cxx
index 1505bb2..ea0df7f 100644
--- a/oox/source/helper/grabbagstack.cxx
+++ b/oox/source/helper/grabbagstack.cxx
@@ -10,6 +10,7 @@
 
 #include "oox/helper/grabbagstack.hxx"
 #include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/sequence.hxx>
 
 namespace oox
 {
@@ -37,14 +38,7 @@ PropertyValue GrabBagStack::getRootProperty()
 
     PropertyValue aProperty;
     aProperty.Name = mCurrentElement.maName;
-
-    Sequence<PropertyValue> aSequence(mCurrentElement.maPropertyList.size());
-    PropertyValue* pSequence = aSequence.getArray();
-    std::vector<PropertyValue>::iterator i;
-    for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i)
-        *pSequence++ = *i;
-
-    aProperty.Value = makeAny(aSequence);
+    aProperty.Value = makeAny(comphelper::containerToSequence(mCurrentElement.maPropertyList));
 
     return aProperty;
 }
@@ -67,12 +61,7 @@ void GrabBagStack::push(const OUString& aKey)
 void GrabBagStack::pop()
 {
     OUString aName = mCurrentElement.maName;
-    Sequence<PropertyValue> aSequence(mCurrentElement.maPropertyList.size());
-    PropertyValue* pSequence = aSequence.getArray();
-    std::vector<PropertyValue>::iterator i;
-    for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i)
-        *pSequence++ = *i;
-
+    Sequence<PropertyValue> aSequence(comphelper::containerToSequence(mCurrentElement.maPropertyList));
     mCurrentElement = mStack.top();
     mStack.pop();
     appendElement(aName, makeAny(aSequence));
diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx
index 4b9f363..09b87b3 100644
--- a/oox/source/vml/vmltextbox.cxx
+++ b/oox/source/vml/vmltextbox.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/text/XTextAppend.hpp>
 #include <com/sun/star/text/WritingMode.hpp>
 #include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <comphelper/sequence.hxx>
 
 namespace oox {
 namespace vml {
@@ -120,11 +121,7 @@ void TextBox::convert(uno::Reference<drawing::XShape> xShape) const
             aPropertyValue.Value = uno::makeAny(rFont.moColor.get().toUInt32(16));
             aPropVec.push_back(aPropertyValue);
         }
-        uno::Sequence<beans::PropertyValue> aPropSeq(aPropVec.size());
-        beans::PropertyValue* pValues = aPropSeq.getArray();
-        for (std::vector<beans::PropertyValue>::iterator i = aPropVec.begin(); i != aPropVec.end(); ++i)
-            *pValues++ = *i;
-        xTextAppend->appendTextPortion(aIt->maText, aPropSeq);
+        xTextAppend->appendTextPortion(aIt->maText, comphelper::containerToSequence(aPropVec));
     }
 
     // Remove the last character of the shape text, if it would be a newline.
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
index 485c45c..7ca2778 100644
--- a/package/source/manifest/ManifestReader.cxx
+++ b/package/source/manifest/ManifestReader.cxx
@@ -20,6 +20,7 @@
 #include <ManifestReader.hxx>
 #include <ManifestImport.hxx>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -59,12 +60,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ManifestReader::readManifestSeque
         aParserInput.sSystemId = "META-INF/manifest.xml";
         xParser->setDocumentHandler ( xFilter );
         xParser->parseStream( aParserInput );
-        aManifestSequence.realloc ( aManVector.size() );
-        Sequence < PropertyValue > * pSequence = aManifestSequence.getArray();
-        ::std::vector < Sequence < PropertyValue > >::const_iterator aIter = aManVector.begin();
-        ::std::vector < Sequence < PropertyValue > >::const_iterator aEnd = aManVector.end();
-        while( aIter != aEnd )
-            *pSequence++ = (*aIter++);
+        aManifestSequence = comphelper::containerToSequence(aManVector);
     }
     catch (SAXParseException& e)
     {
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 1fe2cff..d19452d 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -79,6 +79,7 @@
 #include <comphelper/documentconstants.hxx>
 #include <comphelper/sequenceashashmap.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
 
 using namespace std;
 using namespace osl;
@@ -1017,16 +1018,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq
     pEntry->nSize = pEntry->nCompressedSize = -1;
     pEntry->nTime = ZipOutputStream::getCurrentDosTime();
 
-    // Convert vector into a uno::Sequence
-    uno::Sequence < uno::Sequence < PropertyValue > > aManifestSequence ( aManList.size() );
-    sal_Int32 nInd = 0;
-    for ( vector < uno::Sequence < PropertyValue > >::const_iterator aIter = aManList.begin(), aEnd = aManList.end();
-         aIter != aEnd;
-         ++aIter, ++nInd )
-    {
-        aManifestSequence[nInd] = ( *aIter );
-    }
-    xWriter->writeManifestSequence ( xManOutStream,  aManifestSequence );
+    xWriter->writeManifestSequence ( xManOutStream,  comphelper::containerToSequence(aManList) );
 
     sal_Int32 nBufferLength = static_cast < sal_Int32 > ( pBuffer->getPosition() );
     pBuffer->realloc( nBufferLength );
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 283ffc5..8eb64c7 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/script/Converter.hpp>
 #include <com/sun/star/script/InvocationAdapterFactory.hpp>
 #include <com/sun/star/reflection/theCoreReflection.hpp>
+#include <comphelper/sequence.hxx>
 
 
 using com::sun::star::uno::Reference;
@@ -636,11 +637,7 @@ bool Runtime::pyIterUnpack( PyObject *const pObj, Any &a ) const
         items.push_back( pyObject2Any( rItem.get() ) );
     }
     while( (pItem = PyIter_Next( pObj )) );
-    Sequence<Any> aSeq( items.size() );
-    ::std::list<Any>::iterator it = items.begin();
-    for( int i = 0; it != items.end(); ++it )
-        aSeq[i++] = *it;
-    a <<= aSeq;
+    a <<= comphelper::containerToSequence<Any>(items);
     return true;
 }
 
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 2c6dce1..fab5cc5 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -932,8 +932,7 @@ uno::Any GeometryHandler::getConstantValue(bool _bToControlValue,sal_uInt16 _nRe
 {
     ::std::vector< OUString > aList;
     tools::StringListResource aRes(ModuleRes(_nResId),aList);
-    uno::Sequence< OUString > aSeq(aList.size());
-    ::std::copy( aList.begin(), aList.end(), aSeq.getArray() );
+    uno::Sequence< OUString > aSeq(comphelper::containerToSequence(aList));
 
     uno::Reference< inspection::XStringRepresentation > xConversionHelper = inspection::StringRepresentation::createConstant( m_xContext,m_xTypeConverter,_sConstantName,aSeq);
     if ( _bToControlValue )
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 5e26d7c..a65b3e5 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -19,8 +19,10 @@
 #include <com/sun/star/ui/ItemType.hpp>
 #include <fstream>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
 #include <vcl/graph.hxx>
 #include <map>
+
 using namespace com::sun::star;
 
 typedef std::map< sal_Int16, OUString > IdToString;
@@ -301,13 +303,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere
             sProps[ 0 ].Value = uno::makeAny( ui::ItemType::SEPARATOR_LINE );
             toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
         }
-        uno::Sequence< beans::PropertyValue > sProps( props.size() );
-        beans::PropertyValue* pProp = sProps.getArray();
-
-        for ( std::vector< css::beans::PropertyValue >::iterator it = props.begin(); it != props.end(); ++it, ++pProp )
-            *pProp = *it;
-
-        toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
+        toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( comphelper::containerToSequence(props) ) );
     }
     return true;
 }
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 0ef1b0e..deb144f 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -57,6 +57,7 @@
 #include <com/sun/star/text/XText.hpp>
 #include <comphelper/extract.hxx>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <rtl/math.hxx>
 #include <boost/checked_delete.hpp>
@@ -104,14 +105,6 @@ const SfxItemPropertyMapEntry* lcl_GetDataSequencePropertyMap()
     return aDataSequencePropertyMap_Impl;
 }
 
-template< typename T >
-css::uno::Sequence< T > lcl_VectorToSequence( const ::std::vector< T > & rCont )
-{
-    css::uno::Sequence< T > aResult( rCont.size());
-    ::std::copy( rCont.begin(), rCont.end(), aResult.getArray());
-    return aResult;
-}
-
 struct lcl_appendTableNumber : public ::std::unary_function< SCTAB, void >
 {
     explicit lcl_appendTableNumber( OUStringBuffer & rBuffer ) :
@@ -1794,7 +1787,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
         SolarMutexGuard aGuard;
         OSL_ENSURE( m_pDocument, "No Document -> no detectArguments" );
         if(!m_pDocument ||!xDataSource.is())
-            return lcl_VectorToSequence( aResult );
+            return comphelper::containerToSequence( aResult );
 
         sal_Int32 nDataInRows = 0;
         sal_Int32 nDataInCols = 0;
@@ -1980,7 +1973,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
         uno::Reference< chart2::data::XDataSource > xCompareDataSource;
         try
         {
-            xCompareDataSource.set( this->createDataSource( lcl_VectorToSequence( aResult ) ) );
+            xCompareDataSource.set( this->createDataSource( comphelper::containerToSequence( aResult ) ) );
         }
         catch( const lang::IllegalArgumentException & )
         {
@@ -2039,12 +2032,12 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
         {
             aResult.push_back(
                 beans::PropertyValue( OUString("SequenceMapping"), -1,
-                    uno::makeAny( lcl_VectorToSequence(aSequenceMappingVector) )
+                    uno::makeAny( comphelper::containerToSequence(aSequenceMappingVector) )
                     , beans::PropertyState_DIRECT_VALUE ));
         }
     }
 
-    return lcl_VectorToSequence( aResult );
+    return comphelper::containerToSequence( aResult );
 }
 
 sal_Bool SAL_CALL ScChart2DataProvider::createDataSequenceByRangeRepresentationPossible( const OUString& aRangeRepresentation )
@@ -2414,21 +2407,7 @@ uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence> > SAL_CALL
 ScChart2DataSource::getDataSequences() throw ( uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-
-    LabeledList::const_iterator aItr(m_aLabeledSequences.begin());
-    LabeledList::const_iterator aEndItr(m_aLabeledSequences.end());
-
-    uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aRet(m_aLabeledSequences.size());
-
-    sal_Int32 i = 0;
-    while (aItr != aEndItr)
-    {
-        aRet[i] = *aItr;
-        ++i;
-        ++aItr;
-    }
-
-    return aRet;
+    return comphelper::containerToSequence< uno::Reference< chart2::data::XLabeledDataSequence> >(m_aLabeledSequences);
 }
 
 void ScChart2DataSource::AddLabeledSequence(const uno::Reference < chart2::data::XLabeledDataSequence >& xNew)
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index dc9a9ad..2f6506d 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -20,6 +20,7 @@
 #include <ooo/vba/excel/XRange.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
 #include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <vector>
 #include "unonames.hxx"
@@ -28,6 +29,7 @@
 #include "vbaworkbook.hxx"
 #include "vbastyles.hxx"
 #include "vbaglobals.hxx"
+
 using namespace ::ooo::vba;
 using namespace ::com::sun::star;
 
@@ -191,14 +193,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons
         aProperty.Name = STYLENAME;
         aProperty.Value = uno::makeAny( sStyleName );
 
-        // convert vector to sequence
-        uno::Sequence< beans::PropertyValue > aPropertyValueList(aPropertyValueVector.size());
-        VecPropValues::iterator it = aPropertyValueVector.begin();
-        VecPropValues::iterator it_end = aPropertyValueVector.end();
-        for ( sal_Int32 index=0; it != it_end; ++it )
-            aPropertyValueList[ index++ ] = *it;
-
-        mxSheetConditionalEntries->addNew(aPropertyValueList);
+        mxSheetConditionalEntries->addNew(comphelper::containerToSequence(aPropertyValueVector));
         for (sal_Int32 i = mxSheetConditionalEntries->getCount()-1; i >= 0; i--)
         {
             uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW );
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 3c1fc46..d201f83 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -416,14 +416,7 @@ ScriptEventHelper::getEventListeners()
         }
     }
 
-    Sequence< OUString > sEventMethodNames( eventMethods.size() );
-    std::list< OUString >::const_iterator it = eventMethods.begin();
-    OUString* pDest = sEventMethodNames.getArray();
-
-    for ( ; it != eventMethods.end(); ++it, ++pDest )
-        *pDest = *it;
-
-    return sEventMethodNames;
+    return comphelper::containerToSequence<OUString>(eventMethods);
 }
 
 Sequence< ScriptEventDescriptor >
diff --git a/sd/source/ui/framework/configuration/Configuration.cxx b/sd/source/ui/framework/configuration/Configuration.cxx
index e930f9d..70b5910 100644
--- a/sd/source/ui/framework/configuration/Configuration.cxx
+++ b/sd/source/ui/framework/configuration/Configuration.cxx
@@ -168,12 +168,7 @@ Sequence<Reference<XResourceId> > SAL_CALL Configuration::getResources (
         aResources.push_back(*iResource);
     }
 
-    // Copy the resources from the vector into a new sequence.
-    Sequence<Reference<XResourceId> > aResult (aResources.size());
-    for (size_t nIndex=0; nIndex<aResources.size(); ++nIndex)
-        aResult[nIndex] = aResources[nIndex];
-
-    return aResult;
+    return comphelper::containerToSequence(aResources);
 }
 
 sal_Bool SAL_CALL Configuration::hasResource (const Reference<XResourceId>& rxResourceId)
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index cd9d91f..44044b6 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -479,13 +479,8 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow
                     PropertyState_DIRECT_VALUE));
         }
 
-        // Convert vector into uno Sequence.
-        Sequence< PropertyValue > aPropertySequence (aProperties.size());
-        for (int nIndex=0,nCount=aProperties.size();nIndex<nCount; ++nIndex)
-            aPropertySequence[nIndex] = aProperties[nIndex];
-
         if( getSlideAPI( nCurrentSlideNumber, xSlide, xAnimNode ) )
-            xShow->displaySlide( xSlide, xDrawPages, xAnimNode, aPropertySequence );
+            xShow->displaySlide( xSlide, xDrawPages, xAnimNode, comphelper::containerToSequence(aProperties) );
     }
 }
 
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 7612ca1..e660f5c 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -676,11 +676,8 @@ IPropertyArrayHelper & DrawController::getInfoHelper()
     if (mpPropertyArrayHelper.get() == nullptr)
     {
         ::std::vector<beans::Property> aProperties;
-        FillPropertyTable (aProperties);
-        Sequence<beans::Property> aPropertySequence (aProperties.size());
-        for (size_t i=0; i<aProperties.size(); i++)
-            aPropertySequence[i] = aProperties[i];
-        mpPropertyArrayHelper.reset(new OPropertyArrayHelper(aPropertySequence, sal_False));
+        FillPropertyTable(aProperties);
+        mpPropertyArrayHelper.reset(new OPropertyArrayHelper(comphelper::containerToSequence(aProperties), sal_False));
     }
 
     return *mpPropertyArrayHelper.get();
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 008991d..d15e4ee 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -27,6 +27,7 @@
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <uno/mapping.hxx>
 #include <osl/thread.h>
@@ -1633,19 +1634,7 @@ Sequence< OUString > ImplementationRegistration::getImplementations(
 
                         if (!implNames.empty())
                         {
-                            std::list<OUString>::const_iterator iter = implNames.begin();
-
-                            Sequence<OUString> seqImpl(implNames.size());
-                            OUString *pImplNames = seqImpl.getArray();
-
-                            sal_Int32 index = 0;
-                            while (iter != implNames.end())
-                            {
-                                pImplNames[index] = *iter;
-                                index++;
-                                ++iter;
-                            }
-
+                            Sequence<OUString> seqImpl(comphelper::containerToSequence<OUString>(implNames));
                             xImpl->closeKey();
                             return seqImpl;
                         }
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 73c9ec1..1fdf14f 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -33,6 +33,7 @@
 #include <cppuhelper/bootstrap.hxx>
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -860,14 +861,7 @@ Sequence< OUString > OServiceManager::getUniqueAvailableServiceNames(
         aNameSet.insert( (*aIt++).first );
     */
 
-    Sequence< OUString > aNames( aNameSet.size() );
-    OUString * pArray = aNames.getArray();
-    sal_Int32 i = 0;
-    HashSet_OWString::iterator next = aNameSet.begin();
-    while( next != aNameSet.end() )
-        pArray[i++] = (*next++);
-
-    return aNames;
+    return comphelper::containerToSequence<OUString>(aNameSet);
 }
 
 // XMultiComponentFactory
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index fde28a2..d6c1d82 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -24,6 +24,7 @@
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
 #include <com/sun/star/registry/XSimpleRegistry.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/task/InteractionHandler.hpp>
@@ -177,25 +178,6 @@ static ::rtl::ByteSequence getBufFromAsciiLine( const OUString& line )
 }
 
 
-static Sequence< OUString > copyVectorToSequence( const vector< OUString >& original )
-{
-    Sequence< OUString > newOne ( original.size() );
-    for( size_t i = 0; i < original.size() ; i++ )
-        newOne[i] = original[i];
-
-    return newOne;
-}
-
-static vector< OUString > copySequenceToVector( const Sequence< OUString >& original )
-{
-    vector< OUString > newOne ( original.getLength() );
-    for( int i = 0; i < original.getLength() ; i++ )
-        newOne[i] = original[i];
-
-    return newOne;
-}
-
-
 PassMap StorageItem::getInfo()
 {
     PassMap aResult;
@@ -618,7 +600,7 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b
         }
     }
 
-    return UserRecord( aRecord.GetUserName(), copyVectorToSequence( aPasswords ) );
+    return UserRecord( aRecord.GetUserName(), comphelper::containerToSequence( aPasswords ) );
 }
 
 
@@ -658,7 +640,7 @@ void SAL_CALL PasswordContainer::addPersistent( const OUString& Url, const OUStr
 void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserName, const Sequence< OUString >& Passwords, char Mode, const Reference< XInteractionHandler >& aHandler ) throw(RuntimeException, std::exception)
 {
     NamePassRecord aRecord( UserName );
-    ::std::vector< OUString > aStorePass = copySequenceToVector( Passwords );
+    ::std::vector< OUString > aStorePass = comphelper::sequenceToContainer< std::vector<OUString>, OUString>( Passwords );
 
     if( Mode == PERSISTENT_RECORD )
         aRecord.SetPersPasswords( EncodePasswords( aStorePass, GetMasterPassword( aHandler ) ) );
@@ -1035,7 +1017,7 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
             {
                 sal_Int32 oldLen = aUsers.getLength();
                 aUsers.realloc( oldLen + 1 );
-                aUsers[ oldLen ] = UserRecord( aNPIter->GetUserName(), copyVectorToSequence( DecodePasswords( aNPIter->GetPersPasswords(), GetMasterPassword( xHandler ) ) ) );
+                aUsers[ oldLen ] = UserRecord( aNPIter->GetUserName(), comphelper::containerToSequence( DecodePasswords( aNPIter->GetPersPasswords(), GetMasterPassword( xHandler ) ) ) );
             }
 
         if( aUsers.getLength() )
diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx
index bd1722a..ca54b51 100644
--- a/svl/source/passwordcontainer/syscreds.cxx
+++ b/svl/source/passwordcontainer/syscreds.cxx
@@ -20,6 +20,7 @@
 #include "syscreds.hxx"
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <osl/diagnose.h>
+#include <comphelper/sequence.hxx>
 
 using namespace com::sun::star;
 
@@ -185,19 +186,7 @@ void SysCredentialsConfig::writeCfg()
 
     OSL_ENSURE( m_bCfgInited, "SysCredentialsConfig::writeCfg : not initialized!" );
 
-    uno::Sequence< OUString > aURLs( m_aCfgContainer.size() );
-    StringSet::const_iterator it = m_aCfgContainer.begin();
-    const StringSet::const_iterator end = m_aCfgContainer.end();
-    sal_Int32 n = 0;
-
-    while ( it != end )
-    {
-        aURLs[ n ] = *it;
-        ++it;
-        ++n;
-    }
-
-    m_aConfigItem.setSystemCredentialsURLs( aURLs );
+    m_aConfigItem.setSystemCredentialsURLs( comphelper::containerToSequence<OUString>(m_aCfgContainer) );
 }
 
 OUString SysCredentialsConfig::find( OUString const & aURL )
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 6a22fef..f9f84be 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -37,6 +37,7 @@
 #include <vcl/window.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/servicehelper.hxx>
+#include <comphelper/sequence.hxx>
 #include <sot/filelist.hxx>
 #include <cppuhelper/implbase.hxx>
 
@@ -421,16 +422,7 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr
     {
     }
 
-    Sequence< DataFlavor >          aRet( mpFormats->size() );
-    DataFlavorExVector::iterator    aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
-    sal_uInt32                      nCurPos = 0;
-
-    while( aIter != aEnd )
-    {
-        aRet[ nCurPos++ ] = *aIter++;
-    }
-
-    return aRet;
+    return comphelper::containerToSequence<DataFlavor>(*mpFormats);
 }
 
 
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 8fb2af8..aff1df1 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -51,6 +51,7 @@
 
 #include <comphelper/processfactory.hxx>
 #include <comphelper/property.hxx>
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/component_context.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/childwin.hxx>
@@ -396,10 +397,7 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection )
             Reference< XObjectInspector > xInspector( m_xBrowserController, UNO_QUERY_THROW );
 
             // tell it the objects to inspect
-            Sequence< Reference< XInterface > > aSelection( _rSelection.size() );
-            ::std::copy( _rSelection.begin(), _rSelection.end(), aSelection.getArray() );
-
-            xInspector->inspect( aSelection );
+            xInspector->inspect( comphelper::containerToSequence< Reference< XInterface > >(_rSelection) );
         }
         catch( const VetoException& )
         {
diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx
index e21736f..cef93f1 100644
--- a/svx/source/unodraw/UnoNameItemTable.cxx
+++ b/svx/source/unodraw/UnoNameItemTable.cxx
@@ -22,6 +22,7 @@
 #include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
 #include <svl/style.hxx>
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
 #include <svx/svdmodel.hxx>
@@ -247,18 +248,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames(  )
         aNameSet.insert(aApiName);
     }
 
-    uno::Sequence< OUString > aSeq( aNameSet.size() );
-    OUString* pNames = aSeq.getArray();
-
-    std::set< OUString >::iterator aIter( aNameSet.begin() );
-    const std::set< OUString >::iterator aEnd( aNameSet.end() );
-
-    while( aIter != aEnd )
-    {
-        *pNames++ = *aIter++;
-    }
-
-    return aSeq;
+    return comphelper::containerToSequence<OUString>(aNameSet);
 }
 
 sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName )
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 066c1df..1831643 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <osl/diagnose.h>
@@ -226,18 +227,7 @@ Sequence< OUString > SAL_CALL NamespaceMap::getElementNames() throw (RuntimeExce
     while( aIter.next( aPrefix, aURL ) )
         aPrefixSet.insert( aPrefix );
 
-    Sequence< OUString > aSeq( aPrefixSet.size() );
-    OUString* pPrefixes = aSeq.getArray();
-
-    std::set< OUString >::iterator aPrefixIter( aPrefixSet.begin() );
-    const std::set< OUString >::iterator aEnd( aPrefixSet.end() );
-
-    while( aPrefixIter != aEnd )
-    {
-        *pPrefixes++ = *aPrefixIter++;
-    }
-
-    return aSeq;
+    return comphelper::containerToSequence<OUString>(aPrefixSet);
 }
 
 sal_Bool SAL_CALL NamespaceMap::hasByName( const OUString& aName ) throw (RuntimeException, std::exception)
diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx
index 23723cb..29355e1 100644
--- a/svx/source/unodraw/unomtabl.cxx
+++ b/svx/source/unodraw/unomtabl.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/drawing/PointSequence.hpp>
 #include <svl/style.hxx>
 
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <svl/itempool.hxx>
@@ -356,18 +357,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames()
     // search model pool for line ends
     createNamesForPool( mpModelPool, XATTR_LINEEND, aNameSet );
 
-    uno::Sequence< OUString > aSeq( aNameSet.size() );
-    OUString* pNames = aSeq.getArray();
-
-    std::set< OUString >::iterator aIter( aNameSet.begin() );
-    const std::set< OUString >::iterator aEnd( aNameSet.end() );
-
-    while( aIter != aEnd )
-    {
-        *pNames++ = *aIter++;
-    }
-
-    return aSeq;
+    return comphelper::containerToSequence<OUString>(aNameSet);
 }
 
 sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName )
diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx
index 95d8c40..ee31b1b 100644
--- a/sw/source/core/fields/flddropdown.cxx
+++ b/sw/source/core/fields/flddropdown.cxx
@@ -23,6 +23,7 @@
 
 #include <osl/diagnose.h>
 #include <svl/poolitem.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <unofldmid.h>
 #include <unoprnms.hxx>
@@ -120,18 +121,7 @@ void SwDropDownField::SetItems(const uno::Sequence<OUString> & rItems)
 
 uno::Sequence<OUString> SwDropDownField::GetItemSequence() const
 {
-    uno::Sequence<OUString> aSeq( aValues.size() );
-    OUString* pSeq = aSeq.getArray();
-    int i = 0;
-    vector<OUString>::const_iterator aIt;
-
-    for (aIt = aValues.begin(); aIt != aValues.end(); ++aIt)
-    {
-        pSeq[i] = *aIt;
-        i++;
-    }
-
-    return aSeq;
+    return comphelper::containerToSequence(aValues);
 }
 
 
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index cbf3d98..a4d63b8 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2825,14 +2825,7 @@ uno::Sequence< OUString > SwXTextFieldMasters::getElementNames()
         }
     }
 
-    uno::Sequence< OUString > aSeq( static_cast<sal_Int32>(aFieldNames.size()) );
-    OUString* pArray = aSeq.getArray();
-    for (size_t i = 0; i<aFieldNames.size(); ++i)
-    {
-        pArray[i] = aFieldNames[i];
-    }
-
-    return aSeq;
+    return comphelper::containerToSequence(aFieldNames);
 }
 
 sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::RuntimeException, std::exception )
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 8f9db59..0688b39 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -47,6 +47,7 @@
 #include <viewopt.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/propertysetinfo.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
@@ -107,17 +108,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
 
     if (rPropertyName == "FieldPositions")
     {
-        uno::Sequence<sal_Int32> ret(GetConversionMap().getFieldPositions().size());
-        std::copy(GetConversionMap().getFieldPositions().begin(),
-                GetConversionMap().getFieldPositions().end(), ret.begin());
-        return uno::makeAny(ret);
+        return uno::makeAny( comphelper::containerToSequence( GetConversionMap().getFieldPositions() ) );
     }
     else if (rPropertyName == "FootnotePositions")
     {
-        uno::Sequence<sal_Int32> ret(GetConversionMap().getFootnotePositions().size());
-        std::copy(GetConversionMap().getFootnotePositions().begin(),
-                GetConversionMap().getFootnotePositions().end(), ret.begin());
-        return uno::makeAny(ret);
+        return uno::makeAny( comphelper::containerToSequence( GetConversionMap().getFootnotePositions() ) );
     }
     return uno::Any();
 }
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 8af5203..ca603e8 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -47,6 +47,7 @@
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
 
 using namespace ::com::sun::star;
 
@@ -702,16 +703,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list