std::set->o3tl::sorted_vector in oox
Change-Id: Id7cdf8c4787d89adc9c343a5417093bee2aa603a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
6436302f40
commit
4b6ebf3b4f
@@ -66,6 +66,7 @@
|
|||||||
#include <sax/tools/converter.hxx>
|
#include <sax/tools/converter.hxx>
|
||||||
#include <oox/token/namespacemap.hxx>
|
#include <oox/token/namespacemap.hxx>
|
||||||
#include <editeng/unoprnms.hxx>
|
#include <editeng/unoprnms.hxx>
|
||||||
|
#include <o3tl/sorted_vector.hxx>
|
||||||
|
|
||||||
using ::com::sun::star::xml::dom::DocumentBuilder;
|
using ::com::sun::star::xml::dom::DocumentBuilder;
|
||||||
using ::com::sun::star::xml::dom::XDocument;
|
using ::com::sun::star::xml::dom::XDocument;
|
||||||
@@ -157,7 +158,8 @@ void registerNamespaces( FastParser& rParser )
|
|||||||
|
|
||||||
// Filter out duplicates: a namespace can have multiple URLs, think of
|
// Filter out duplicates: a namespace can have multiple URLs, think of
|
||||||
// strict vs transitional.
|
// strict vs transitional.
|
||||||
std::set<sal_Int32> aSet;
|
o3tl::sorted_vector<sal_Int32> aSet;
|
||||||
|
aSet.reserve(ids.getLength());
|
||||||
for (const auto& rId : ids)
|
for (const auto& rId : ids)
|
||||||
aSet.insert(rId.Second);
|
aSet.insert(rId.Second);
|
||||||
|
|
||||||
|
@@ -103,6 +103,7 @@
|
|||||||
|
|
||||||
#include <rtl/math.hxx>
|
#include <rtl/math.hxx>
|
||||||
#include <o3tl/temporary.hxx>
|
#include <o3tl/temporary.hxx>
|
||||||
|
#include <o3tl/sorted_vector.hxx>
|
||||||
|
|
||||||
using namespace css;
|
using namespace css;
|
||||||
using namespace css::uno;
|
using namespace css::uno;
|
||||||
@@ -3664,10 +3665,11 @@ void ChartExport::exportDataPoints(
|
|||||||
|
|
||||||
if( bVaryColorsByPoint && xColorScheme.is() )
|
if( bVaryColorsByPoint && xColorScheme.is() )
|
||||||
{
|
{
|
||||||
::std::set< sal_Int32 > aAttrPointSet;
|
o3tl::sorted_vector< sal_Int32 > aAttrPointSet;
|
||||||
::std::copy( pPoints, pPoints + aDataPointSeq.getLength(),
|
aAttrPointSet.reserve(aDataPointSeq.getLength());
|
||||||
::std::inserter( aAttrPointSet, aAttrPointSet.begin()));
|
for (auto p = pPoints; p < pPoints + aDataPointSeq.getLength(); ++p)
|
||||||
const ::std::set< sal_Int32 >::const_iterator aEndIt( aAttrPointSet.end());
|
aAttrPointSet.insert(*p);
|
||||||
|
const auto aEndIt = aAttrPointSet.end();
|
||||||
for( nElement = 0; nElement < nSeriesLength; ++nElement )
|
for( nElement = 0; nElement < nSeriesLength; ++nElement )
|
||||||
{
|
{
|
||||||
uno::Reference< beans::XPropertySet > xPropSet;
|
uno::Reference< beans::XPropertySet > xPropSet;
|
||||||
@@ -3724,10 +3726,11 @@ void ChartExport::exportDataPoints(
|
|||||||
if( bVaryColorsByPoint )
|
if( bVaryColorsByPoint )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
::std::set< sal_Int32 > aAttrPointSet;
|
o3tl::sorted_vector< sal_Int32 > aAttrPointSet;
|
||||||
::std::copy( pPoints, pPoints + aDataPointSeq.getLength(),
|
aAttrPointSet.reserve(aDataPointSeq.getLength());
|
||||||
::std::inserter( aAttrPointSet, aAttrPointSet.begin()));
|
for (auto p = pPoints; p < pPoints + aDataPointSeq.getLength(); ++p)
|
||||||
const ::std::set< sal_Int32 >::const_iterator aEndIt( aAttrPointSet.end());
|
aAttrPointSet.insert(*p);
|
||||||
|
const auto aEndIt = aAttrPointSet.end();
|
||||||
for( nElement = 0; nElement < nSeriesLength; ++nElement )
|
for( nElement = 0; nElement < nSeriesLength; ++nElement )
|
||||||
{
|
{
|
||||||
uno::Reference< beans::XPropertySet > xPropSet;
|
uno::Reference< beans::XPropertySet > xPropSet;
|
||||||
|
Reference in New Issue
Block a user