Kaydet (Commit) 7c5d5299 authored tarafından Michael Stahl's avatar Michael Stahl

xmloff: replace boost::ptr_vector with std::vector

Change-Id: Id7c1a28370f35fce7d885041a18e81a89defb69c
üst 2ab47066
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include <xmloff/xmlexp.hxx> #include <xmloff/xmlexp.hxx>
#include <set> #include <set>
#include <boost/ptr_container/ptr_vector.hpp> #include <vector>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::xmloff::token; using namespace ::xmloff::token;
...@@ -62,16 +62,26 @@ struct LessuInt32 ...@@ -62,16 +62,26 @@ struct LessuInt32
typedef std::set< sal_uInt32, LessuInt32 > SvXMLuInt32Set; 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 class SvXMLEmbeddedTextEntryArr
{ {
typedef boost::ptr_vector<SvXMLEmbeddedTextEntry> DataType; typedef std::vector<SvXMLEmbeddedTextEntry> DataType;
DataType maData; DataType maData;
public: 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 const SvXMLEmbeddedTextEntry& operator[] ( size_t i ) const
...@@ -109,16 +119,6 @@ public: ...@@ -109,16 +119,6 @@ public:
void SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed); 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 should be optimized!
SvXMLNumUsedList_Impl::SvXMLNumUsedList_Impl() : SvXMLNumUsedList_Impl::SvXMLNumUsedList_Impl() :
...@@ -614,7 +614,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl( ...@@ -614,7 +614,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
sal_uInt16 nEntryCount = rEmbeddedEntries.size(); sal_uInt16 nEntryCount = rEmbeddedEntries.size();
for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++) for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{ {
const SvXMLEmbeddedTextEntry* pObj = &rEmbeddedEntries[nEntry]; const SvXMLEmbeddedTextEntry *const pObj = &rEmbeddedEntries[nEntry];
// position attribute // position attribute
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_POSITION, rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_POSITION,
...@@ -1289,8 +1289,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt ...@@ -1289,8 +1289,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
} }
sal_Int32 nEmbedPos = nIntegerSymbols - nDigitsPassed; sal_Int32 nEmbedPos = nIntegerSymbols - nDigitsPassed;
SvXMLEmbeddedTextEntry* pObj = new SvXMLEmbeddedTextEntry( nPos, nEmbedPos, aEmbeddedStr ); aEmbeddedEntries.push_back(
aEmbeddedEntries.push_back( pObj ); SvXMLEmbeddedTextEntry(nPos, nEmbedPos, aEmbeddedStr));
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment