diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-17 09:21:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-17 11:00:51 +0100 |
commit | eaf2c278888ebca0ac99055ee34df6f011da3596 (patch) | |
tree | 3177ca36a5eeac09b791ded9fc55d2d82e52c9cd /svl | |
parent | 498cb0b3a372ce1ec0e66640eb0badddff3f2e90 (diff) |
boost->std
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/pch/precompiled_svl.hxx | 1 | ||||
-rw-r--r-- | svl/qa/unit/svl.cxx | 12 | ||||
-rw-r--r-- | svl/source/inc/poolio.hxx | 4 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 1 | ||||
-rw-r--r-- | svl/source/items/itemprop.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/poolio.cxx | 4 | ||||
-rw-r--r-- | svl/source/misc/getstringresource.cxx | 5 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 16 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 1 |
9 files changed, 23 insertions, 25 deletions
diff --git a/svl/inc/pch/precompiled_svl.hxx b/svl/inc/pch/precompiled_svl.hxx index 95de5f76dd8d..f497d3b44e7d 100644 --- a/svl/inc/pch/precompiled_svl.hxx +++ b/svl/inc/pch/precompiled_svl.hxx @@ -21,7 +21,6 @@ #include <boost/ptr_container/ptr_map.hpp> #include <boost/ptr_container/ptr_vector.hpp> #include <memory> -#include <boost/scoped_ptr.hpp> #include <cassert> #include <cmath> #include <com/sun/star/awt/Point.hpp> diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index f6ee9e245f8e..4d00395c1882 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -37,7 +37,7 @@ #include <svl/sharedstring.hxx> #include <unotools/syslocale.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <unicode/calendar.h> using namespace ::com::sun::star; @@ -81,7 +81,7 @@ private: LanguageType eLang, OUString& sExpected); void checkDateInput( SvNumberFormatter& rFormatter, const char* pTimezone, const char* pIsoDate ); - boost::scoped_ptr<icu::TimeZone> m_pDefaultTimeZone; + std::unique_ptr<icu::TimeZone> m_pDefaultTimeZone; }; Test::Test() @@ -351,10 +351,10 @@ void Test::testSharedStringPoolPurge() CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), aPool.getCountIgnoreCase()); // Now, create string objects on the heap. - boost::scoped_ptr<OUString> pStr1(new OUString("Andy")); - boost::scoped_ptr<OUString> pStr2(new OUString("andy")); - boost::scoped_ptr<OUString> pStr3(new OUString("ANDY")); - boost::scoped_ptr<OUString> pStr4(new OUString("Bruce")); + std::unique_ptr<OUString> pStr1(new OUString("Andy")); + std::unique_ptr<OUString> pStr2(new OUString("andy")); + std::unique_ptr<OUString> pStr3(new OUString("ANDY")); + std::unique_ptr<OUString> pStr4(new OUString("Bruce")); aPool.intern(*pStr1); aPool.intern(*pStr2); aPool.intern(*pStr3); diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index ef8640bea32a..dc524ac24aec 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -21,8 +21,8 @@ #define INCLUDED_SVL_SOURCE_INC_POOLIO_HXX #include <svl/SfxBroadcaster.hxx> -#include <boost/shared_ptr.hpp> #include <deque> +#include <memory> #include <unordered_map> #include <vector> @@ -60,7 +60,7 @@ struct SfxPoolVersion_Impl typedef std::vector<SfxPoolItem*> SfxPoolItemArrayBase_Impl; -typedef boost::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr; +typedef std::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr; /** * This array contains a set of SfxPoolItems, if those items are diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index c76d8f45adc1..20b9e3a719fa 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -28,6 +28,7 @@ #include <svl/smplhint.hxx> #include "poolio.hxx" +#include <algorithm> #include <vector> diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index 3916db7e8038..66951f1340c0 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -22,7 +22,7 @@ #include <svl/itempool.hxx> #include <svl/itemset.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <unordered_map> /* * UNO III Implementation @@ -233,7 +233,7 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn { // get the SfxPoolItem const SfxPoolItem* pItem = 0; - boost::scoped_ptr<SfxPoolItem> pNewItem; + std::unique_ptr<SfxPoolItem> pNewItem; SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem ); if(SfxItemState::SET != eState && SFX_WHICH_MAX > rEntry.nWID ) pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID); diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index 441396054eab..bed569a1bac1 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -27,7 +27,7 @@ #include <svl/SfxBroadcaster.hxx> #include <svl/filerec.hxx> #include "poolio.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> /** * Returns the <SfxItemPool> that is being saved. @@ -236,7 +236,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const { sal_uLong nMark = rStream.Tell(); rStream.Seek( nItemStartPos + sizeof(sal_uInt16) ); - boost::scoped_ptr<SfxPoolItem> pClone(pItem->Create(rStream, nItemVersion )); + std::unique_ptr<SfxPoolItem> pClone(pItem->Create(rStream, nItemVersion )); sal_uInt16 nWh = pItem->Which(); SFX_ASSERT( rStream.Tell() == nMark, nWh,"asymmetric store/create" ); SFX_ASSERT( *pClone == *pItem, nWh, "unequal after store/create" ); diff --git a/svl/source/misc/getstringresource.cxx b/svl/source/misc/getstringresource.cxx index 086c704d59cc..6f0de30bc450 100644 --- a/svl/source/misc/getstringresource.cxx +++ b/svl/source/misc/getstringresource.cxx @@ -20,9 +20,8 @@ #include <sal/config.h> #include <map> - +#include <memory> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> #include <i18nlangtag/languagetag.hxx> #include <rtl/instance.hxx> #include <rtl/ustrbuf.hxx> @@ -62,7 +61,7 @@ SimpleResMgr * ResMgrMap::get(LanguageTag const & locale) { OUString code( locale.getBcp47()); Map::iterator i(map_.find(code)); if (i == map_.end()) { - boost::scoped_ptr< SimpleResMgr > mgr( + std::unique_ptr< SimpleResMgr > mgr( new SimpleResMgr("svl", locale)); i = map_.insert(Map::value_type(code, mgr.get())).first; mgr.reset(); diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index d7596cb12f05..4a3067869419 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -50,7 +50,7 @@ #include <math.h> #include <limits> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -1531,7 +1531,7 @@ bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString, eLnge = ActLnge; sal_Int32 nCheckPos = -1; OUString sTmpString = sFormatString; - boost::scoped_ptr<SvNumberformat> p_Entry(new SvNumberformat(sTmpString, + std::unique_ptr<SvNumberformat> p_Entry(new SvNumberformat(sTmpString, pFormatScanner, pStringScanner, nCheckPos, @@ -1592,7 +1592,7 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString, return true; } - boost::scoped_ptr<SvNumberformat> pEntry; + std::unique_ptr<SvNumberformat> pEntry; sal_Int32 nCheckPos = -1; OUString sTmpString; @@ -1635,7 +1635,7 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString, eFormatLang = eLnge; pFormatScanner->SetConvertMode( eLnge, LANGUAGE_ENGLISH_US ); sTmpString = sFormatString; - boost::scoped_ptr<SvNumberformat> pEntry2(new SvNumberformat( sTmpString, pFormatScanner, + std::unique_ptr<SvNumberformat> pEntry2(new SvNumberformat( sTmpString, pFormatScanner, pStringScanner, nCheckPos2, eFormatLang )); pFormatScanner->SetConvertMode( false ); ChangeIntl( eLnge ); @@ -1679,7 +1679,7 @@ bool SvNumberFormatter::GetPreviewString( const OUString& sFormatString, eLnge = ActLnge; sal_Int32 nCheckPos = -1; OUString sTmpString = sFormatString; - boost::scoped_ptr<SvNumberformat> p_Entry(new SvNumberformat( sTmpString, + std::unique_ptr<SvNumberformat> p_Entry(new SvNumberformat( sTmpString, pFormatScanner, pStringScanner, nCheckPos, @@ -1732,7 +1732,7 @@ sal_uInt32 SvNumberFormatter::TestNewString(const OUString& sFormatString, sal_uInt32 nRes; sal_Int32 nCheckPos = -1; OUString sTmpString = sFormatString; - boost::scoped_ptr<SvNumberformat> pEntry(new SvNumberformat(sTmpString, + std::unique_ptr<SvNumberformat> pEntry(new SvNumberformat(sTmpString, pFormatScanner, pStringScanner, nCheckPos, @@ -1945,7 +1945,7 @@ sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const OUString& rFormatStrin eLnge = ActLnge; OUString aTmpStr( rFormatString ); sal_Int32 nCheckPos = 0; - boost::scoped_ptr<SvNumberformat> pFormat(new SvNumberformat( aTmpStr, pFormatScanner, + std::unique_ptr<SvNumberformat> pFormat(new SvNumberformat( aTmpStr, pFormatScanner, pStringScanner, nCheckPos, eLnge )); if ( nCheckPos == 0 ) { @@ -3646,7 +3646,7 @@ void SvNumberFormatter::ImpInitCurrencyTable() bInitializing = true; LanguageType eSysLang = SvtSysLocale().GetLanguageTag().getLanguageType(); - boost::scoped_ptr<LocaleDataWrapper> pLocaleData(new LocaleDataWrapper( + std::unique_ptr<LocaleDataWrapper> pLocaleData(new LocaleDataWrapper( ::comphelper::getProcessComponentContext(), SvtSysLocale().GetLanguageTag() )); // get user configured currency diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index e632c8f257a2..2dc1c54b86cc 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -45,7 +45,6 @@ #include <svl/nfsymbol.hxx> #include <cmath> -#include <boost/scoped_ptr.hpp> using namespace svt; |