summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-19 09:14:59 +0200
committerNoel Grandin <noel@peralex.com>2015-11-19 09:33:29 +0200
commit2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd (patch)
tree1b8fd3940910ffcd328e16a53e208c099f67ab21 /svx
parentf7b5f477bfd942e0a1d8880c372635000d724dd7 (diff)
use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmPropBrw.cxx6
-rw-r--r--svx/source/unodraw/UnoNameItemTable.cxx14
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx14
-rw-r--r--svx/source/unodraw/unomtabl.cxx14
4 files changed, 8 insertions, 40 deletions
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 8fb2af8dd263..aff1df1df3bf 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 e21736f7d7b1..cef93f16b146 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 066c1df4e02c..183164370308 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 23723cb68247..29355e1d1b81 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 )