diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-01-31 12:28:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-01-31 17:25:52 +0000 |
commit | 1fd280f2c63cdf8d24b48c02fe384f0bc20682c1 (patch) | |
tree | 35b84f9730d7a6def967869336cc437e94ca6439 /xmloff | |
parent | de368b7783dff197ae279e0720c61efb2e0ff274 (diff) |
boost::tuple -> std::tuple
Change-Id: Ia08c184b792ff73d3ed49d6a5d54dec1a35943e9
Reviewed-on: https://gerrit.libreoffice.org/21955
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/pch/precompiled_xo.hxx | 2 | ||||
-rw-r--r-- | xmloff/inc/txtlists.hxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 21 | ||||
-rw-r--r-- | xmloff/source/text/txtlists.cxx | 16 |
4 files changed, 23 insertions, 24 deletions
diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx index e8bebb54bb95..b1ac1e3083bf 100644 --- a/xmloff/inc/pch/precompiled_xo.hxx +++ b/xmloff/inc/pch/precompiled_xo.hxx @@ -36,6 +36,7 @@ #include <ostream> #include <set> #include <sstream> +#include <tuple> #include <stddef.h> #include <string.h> #include <string> @@ -44,7 +45,6 @@ #include <vector> #include <boost/iterator_adaptors.hpp> #include <boost/noncopyable.hpp> -#include <boost/tuple/tuple.hpp> #include <osl/diagnose.h> #include <osl/doublecheckedlocking.h> #include <osl/endian.h> diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index 46beb4b0e382..fc8f12d8c16c 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.hxx @@ -22,10 +22,10 @@ #include <rtl/ustring.hxx> #include <map> -#include <vector> #include <stack> +#include <tuple> +#include <vector> #include <boost/noncopyable.hpp> -#include <boost/tuple/tuple.hpp> #include <com/sun/star/container/XIndexReplace.hpp> #include <xmloff/xmlictxt.hxx> @@ -126,9 +126,9 @@ class XMLTextListsHelper : private boost::noncopyable XMLTextListBlockContext, XMLTextListItemContext, XMLNumberedParaContext */ - typedef ::boost::tuple<SvXMLImportContextRef, + typedef std::tuple<SvXMLImportContextRef, SvXMLImportContextRef, SvXMLImportContextRef> ListStackFrame_t; - ::std::stack< ListStackFrame_t > mListStack; + std::stack< ListStackFrame_t > mListStack; // container type for processed lists: // map with <ListId> as key and pair( <ListStyleName, ContinueListId> ) diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index eb087aab898c..542147dcae11 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -17,10 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -#include <vector> - #include <memory> +#include <tuple> +#include <vector> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -524,18 +523,18 @@ struct XMLTextImportHelper::Impl - data structure contains more than one candidate for each list level of the outline style (#i69629#) */ - ::std::unique_ptr< ::std::vector< OUString > []> + std::unique_ptr< std::vector< OUString > []> m_xOutlineStylesCandidates; // start range, xml:id, RDFa stuff - typedef ::boost::tuple< + typedef std::tuple< uno::Reference<text::XTextRange>, OUString, std::shared_ptr< ::xmloff::ParsedRDFaAttributes > > BookmarkMapEntry_t; /// start ranges for open bookmarks - ::std::map< OUString, BookmarkMapEntry_t > m_BookmarkStartRanges; + std::map< OUString, BookmarkMapEntry_t > m_BookmarkStartRanges; - typedef ::std::vector< OUString > BookmarkVector_t; + typedef std::vector< OUString > BookmarkVector_t; BookmarkVector_t m_BookmarkVector; /// name of the last 'open' redline that started between paragraphs @@ -2492,7 +2491,7 @@ void XMLTextImportHelper::InsertBookmarkStartRange( std::shared_ptr< ::xmloff::ParsedRDFaAttributes > & i_rpRDFaAttributes) { m_xImpl->m_BookmarkStartRanges[sName] = - ::boost::make_tuple(rRange, i_rXmlId, i_rpRDFaAttributes); + std::make_tuple(rRange, i_rXmlId, i_rpRDFaAttributes); m_xImpl->m_BookmarkVector.push_back(sName); } @@ -2506,9 +2505,9 @@ bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( { Impl::BookmarkMapEntry_t & rEntry = (*m_xImpl->m_BookmarkStartRanges.find(sName)).second; - o_rRange.set(rEntry.get<0>()); - o_rXmlId = rEntry.get<1>(); - o_rpRDFaAttributes = rEntry.get<2>(); + o_rRange.set(std::get<0>(rEntry)); + o_rXmlId = std::get<1>(rEntry); + o_rpRDFaAttributes = std::get<2>(rEntry); m_xImpl->m_BookmarkStartRanges.erase(sName); Impl::BookmarkVector_t::iterator it(m_xImpl->m_BookmarkVector.begin()); while (it != m_xImpl->m_BookmarkVector.end() && it->compareTo(sName)!=0) diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index f3f6c4e24e32..2ec8dff91288 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -76,7 +76,7 @@ XMLTextListsHelper::~XMLTextListsHelper() void XMLTextListsHelper::PushListContext( XMLTextListBlockContext *i_pListBlock) { - mListStack.push(::boost::make_tuple(i_pListBlock, + mListStack.push(std::make_tuple(i_pListBlock, static_cast<XMLTextListItemContext*>(nullptr), static_cast<XMLNumberedParaContext*>(nullptr))); } @@ -84,7 +84,7 @@ void XMLTextListsHelper::PushListContext( void XMLTextListsHelper::PushListContext( XMLNumberedParaContext *i_pNumberedParagraph) { - mListStack.push(::boost::make_tuple( + mListStack.push(std::make_tuple( static_cast<XMLTextListBlockContext*>(nullptr), static_cast<XMLTextListItemContext*>(nullptr), i_pNumberedParagraph)); } @@ -103,11 +103,11 @@ void XMLTextListsHelper::ListContextTop( { if ( !mListStack.empty() ) { o_pListBlockContext = - static_cast<XMLTextListBlockContext*>(&mListStack.top().get<0>()); + static_cast<XMLTextListBlockContext*>(&std::get<0>(mListStack.top())); o_pListItemContext = - static_cast<XMLTextListItemContext *>(&mListStack.top().get<1>()); + static_cast<XMLTextListItemContext *>(&std::get<1>(mListStack.top())); o_pNumberedParagraphContext = - static_cast<XMLNumberedParaContext *>(&mListStack.top().get<2>()); + static_cast<XMLNumberedParaContext *>(&std::get<2>(mListStack.top())); } } @@ -116,13 +116,13 @@ void XMLTextListsHelper::SetListItem( XMLTextListItemContext *i_pListItem ) // may be cleared by ListBlockContext for upper list... if (i_pListItem) { assert(mListStack.size()); - assert(mListStack.top().get<0>() && + assert(std::get<0>(mListStack.top()) && "internal error: SetListItem: mListStack has no ListBlock"); - assert(!mListStack.top().get<1>() && + assert(!std::get<1>(mListStack.top()) && "error: SetListItem: list item already exists"); } if ( !mListStack.empty() ) { - mListStack.top().get<1>() = i_pListItem; + std::get<1>(mListStack.top()) = i_pListItem; } } |