summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-10-30 22:47:15 +0100
committerMichael Stahl <mstahl@redhat.com>2015-11-02 11:43:12 +0100
commit7c5d52999a0424e4980d48caa59005c197102abf (patch)
tree305d8e17cb2cc7a5b94ca0d298aa74a914cd63d9 /xmloff
parent2ab470665f9cb350a9a3d10ecf1e1b85b72f676b (diff)
xmloff: replace boost::ptr_vector with std::vector
Change-Id: Id7c1a28370f35fce7d885041a18e81a89defb69c
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index c52a82d158d2..2d6043d0d54a 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -46,7 +46,7 @@
#include <xmloff/xmlexp.hxx>
#include <set>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -62,16 +62,26 @@ struct LessuInt32
typedef std::set< sal_uInt32, LessuInt32 > SvXMLuInt32Set;
+struct SvXMLEmbeddedTextEntry
+{
+ sal_uInt16 nSourcePos; // position in NumberFormat (to skip later)
+ sal_Int32 nFormatPos; // resulting position in embedded-text element
+ OUString aText;
+
+ SvXMLEmbeddedTextEntry( sal_uInt16 nSP, sal_Int32 nFP, const OUString& rT ) :
+ nSourcePos(nSP), nFormatPos(nFP), aText(rT) {}
+};
+
class SvXMLEmbeddedTextEntryArr
{
- typedef boost::ptr_vector<SvXMLEmbeddedTextEntry> DataType;
+ typedef std::vector<SvXMLEmbeddedTextEntry> DataType;
DataType maData;
public:
- void push_back( SvXMLEmbeddedTextEntry* p )
+ void push_back( SvXMLEmbeddedTextEntry const& r )
{
- maData.push_back(p);
+ maData.push_back(r);
}
const SvXMLEmbeddedTextEntry& operator[] ( size_t i ) const
@@ -109,16 +119,6 @@ public:
void SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed);
};
-struct SvXMLEmbeddedTextEntry
-{
- sal_uInt16 nSourcePos; // position in NumberFormat (to skip later)
- sal_Int32 nFormatPos; // resulting position in embedded-text element
- OUString aText;
-
- SvXMLEmbeddedTextEntry( sal_uInt16 nSP, sal_Int32 nFP, const OUString& rT ) :
- nSourcePos(nSP), nFormatPos(nFP), aText(rT) {}
-};
-
//! SvXMLNumUsedList_Impl should be optimized!
SvXMLNumUsedList_Impl::SvXMLNumUsedList_Impl() :
@@ -614,7 +614,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
sal_uInt16 nEntryCount = rEmbeddedEntries.size();
for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
- const SvXMLEmbeddedTextEntry* pObj = &rEmbeddedEntries[nEntry];
+ const SvXMLEmbeddedTextEntry *const pObj = &rEmbeddedEntries[nEntry];
// position attribute
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_POSITION,
@@ -1289,8 +1289,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
}
sal_Int32 nEmbedPos = nIntegerSymbols - nDigitsPassed;
- SvXMLEmbeddedTextEntry* pObj = new SvXMLEmbeddedTextEntry( nPos, nEmbedPos, aEmbeddedStr );
- aEmbeddedEntries.push_back( pObj );
+ aEmbeddedEntries.push_back(
+ SvXMLEmbeddedTextEntry(nPos, nEmbedPos, aEmbeddedStr));
}
break;
}