summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-17 09:21:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-17 11:00:51 +0100
commiteaf2c278888ebca0ac99055ee34df6f011da3596 (patch)
tree3177ca36a5eeac09b791ded9fc55d2d82e52c9cd /sax
parent498cb0b3a372ce1ec0e66640eb0badddff3f2e90 (diff)
boost->std
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
Diffstat (limited to 'sax')
-rw-r--r--sax/source/fastparser/fastparser.cxx22
-rw-r--r--sax/source/tools/CachedOutputStream.hxx6
-rw-r--r--sax/source/tools/fastserializer.cxx4
-rw-r--r--sax/source/tools/fastserializer.hxx14
4 files changed, 22 insertions, 24 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 04ec93133225..86cc85892602 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -38,13 +38,11 @@
#include <sal/log.hxx>
#include <salhelper/thread.hxx>
-#include <boost/optional.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <queue>
+#include <memory>
#include <stack>
#include <unordered_map>
#include <vector>
-#include <queue>
#include <cassert>
#include <cstring>
#include <libxml/parser.h>
@@ -52,7 +50,7 @@
// Inverse of libxml's BAD_CAST.
#define XML_CAST( str ) reinterpret_cast< const sal_Char* >( str )
-using namespace ::std;
+using namespace std;
using namespace ::osl;
using namespace ::cppu;
using namespace ::com::sun::star::uno;
@@ -69,10 +67,10 @@ class FastLocatorImpl;
struct NamespaceDefine;
struct Entity;
-typedef ::boost::shared_ptr< NamespaceDefine > NamespaceDefineRef;
+typedef std::shared_ptr< NamespaceDefine > NamespaceDefineRef;
typedef std::unordered_map< OUString, sal_Int32,
- OUStringHash, ::std::equal_to< OUString > > NamespaceMap;
+ OUStringHash, std::equal_to< OUString > > NamespaceMap;
typedef std::vector<Event> EventList;
@@ -176,14 +174,14 @@ struct Entity : public ParserData
void throwException( const ::rtl::Reference< FastLocatorImpl > &xDocumentLocator,
bool mbDuringParse );
- ::std::stack< NameWithToken > maNamespaceStack;
+ std::stack< NameWithToken > maNamespaceStack;
/* Context for main thread consuming events.
* startElement() stores the data, which characters() and endElement() uses
*/
- ::std::stack< SaxContext> maContextStack;
+ std::stack< SaxContext> maContextStack;
// Determines which elements of maNamespaceDefines are valid in current context
- ::std::stack< sal_uInt32 > maNamespaceCount;
- ::std::vector< NamespaceDefineRef > maNamespaceDefines;
+ std::stack< sal_uInt32 > maNamespaceCount;
+ std::vector< NamespaceDefineRef > maNamespaceDefines;
explicit Entity( const ParserData& rData );
Entity( const Entity& rEntity );
@@ -260,7 +258,7 @@ private:
ParserData maData; /// Cached parser configuration for next call of parseStream().
Entity *mpTop; /// std::stack::top() is amazingly slow => cache this.
- ::std::stack< Entity > maEntities; /// Entity stack for each call of parseStream().
+ std::stack< Entity > maEntities; /// Entity stack for each call of parseStream().
OUString pendingCharacters; /// Data from characters() callback that needs to be sent.
};
diff --git a/sax/source/tools/CachedOutputStream.hxx b/sax/source/tools/CachedOutputStream.hxx
index f11697871ad0..f32693e70f92 100644
--- a/sax/source/tools/CachedOutputStream.hxx
+++ b/sax/source/tools/CachedOutputStream.hxx
@@ -17,7 +17,7 @@
#include <cstring>
#include <cstdlib>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace sax_fastparser {
@@ -40,7 +40,7 @@ class CachedOutputStream
uno_Sequence *pSeq;
bool mbWriteToOutStream;
/// ForMerge structure is used for sorting elements in Writer
- boost::shared_ptr< ForMergeBase > mpForMerge;
+ std::shared_ptr< ForMergeBase > mpForMerge;
public:
CachedOutputStream() : mnCacheWrittenSize(0)
@@ -61,7 +61,7 @@ public:
mxOutputStream = xOutputStream;
}
- void setOutput( boost::shared_ptr< ForMergeBase > pForMerge )
+ void setOutput( std::shared_ptr< ForMergeBase > pForMerge )
{
flush();
mbWriteToOutStream = false;
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 32c0358ec618..0d0eb717c75f 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -334,13 +334,13 @@ namespace sax_fastparser {
{
if (rOrder.hasElements())
{
- boost::shared_ptr< ForMerge > pSort( new ForSort(nTag, rOrder) );
+ std::shared_ptr< ForMerge > pSort( new ForSort(nTag, rOrder) );
maMarkStack.push( pSort );
maCachedOutputStream.setOutput( pSort );
}
else
{
- boost::shared_ptr< ForMerge > pMerge( new ForMerge(nTag) );
+ std::shared_ptr< ForMerge > pMerge( new ForMerge(nTag) );
maMarkStack.push( pMerge );
maCachedOutputStream.setOutput( pMerge );
}
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx
index 1f30313def4d..d5925fd9ebd8 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -29,7 +29,7 @@
#include <stack>
#include <map>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace sax_fastparser {
@@ -169,11 +169,11 @@ private:
sal_Int32 const m_Tag;
#ifdef DBG_UTIL
// pending close tags, followed by pending open tags
- ::std::deque<sal_Int32> m_DebugEndedElements;
- ::std::deque<sal_Int32> m_DebugStartedElements;
+ std::deque<sal_Int32> m_DebugEndedElements;
+ std::deque<sal_Int32> m_DebugStartedElements;
// ... and another buffer for maPostponed ...
- ::std::deque<sal_Int32> m_DebugPostponedEndedElements;
- ::std::deque<sal_Int32> m_DebugPostponedStartedElements;
+ std::deque<sal_Int32> m_DebugPostponedEndedElements;
+ std::deque<sal_Int32> m_DebugPostponedStartedElements;
#endif
ForMerge(sal_Int32 const nTag) : m_Tag(nTag) {}
@@ -222,7 +222,7 @@ private:
void sort();
};
- ::std::stack< boost::shared_ptr< ForMerge > > maMarkStack;
+ std::stack< std::shared_ptr< ForMerge > > maMarkStack;
bool mbMarkStackEmpty;
// Would be better to use OStringBuffer instead of these two
// but then we couldn't get the rtl_String* member :-(
@@ -231,7 +231,7 @@ private:
TokenValueList maTokenValues;
#ifdef DBG_UTIL
- ::std::stack<sal_Int32> m_DebugStartedElements;
+ std::stack<sal_Int32> m_DebugStartedElements;
#endif
void writeTokenValueList();