diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-29 15:20:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-29 15:20:22 +0200 |
commit | dc635425118c77d35534d1bf8b3aa12a1ad95752 (patch) | |
tree | 266c8b6b45110eccfe4c8cac375e0eb0ffde3db9 | |
parent | d3de12fcfc85feb36eda3b0495807ef11d8fe772 (diff) |
svx: std::auto_ptr -> std::unique_ptr
Change-Id: Ib70d974817bcdd9a582e9be28d28b007cdc3a7a7
-rw-r--r-- | include/svx/AccessibleTextHelper.hxx | 2 | ||||
-rw-r--r-- | include/svx/databaselocationinput.hxx | 2 | ||||
-rw-r--r-- | include/svx/dialcontrol.hxx | 2 | ||||
-rw-r--r-- | include/svx/fmshell.hxx | 2 | ||||
-rw-r--r-- | include/svx/frmsel.hxx | 2 | ||||
-rw-r--r-- | include/svx/orienthelper.hxx | 2 | ||||
-rw-r--r-- | include/svx/shapepropertynotifier.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofunocontrol.hxx | 2 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleEmptyEditSource.cxx | 8 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleEmptyEditSource.hxx | 4 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleTextEventQueue.cxx | 6 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleTextEventQueue.hxx | 2 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleTextHelper.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmshell.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmvwimp.cxx | 8 | ||||
-rw-r--r-- | svx/source/inc/formcontrolfactory.hxx | 2 | ||||
-rw-r--r-- | svx/source/inc/formcontroller.hxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/shells/txtcrsr.cxx | 8 |
19 files changed, 33 insertions, 51 deletions
diff --git a/include/svx/AccessibleTextHelper.hxx b/include/svx/AccessibleTextHelper.hxx index 8d13e9d6236d..2534976470b1 100644 --- a/include/svx/AccessibleTextHelper.hxx +++ b/include/svx/AccessibleTextHelper.hxx @@ -411,7 +411,7 @@ namespace accessibility private: /// @dyn - const std::auto_ptr< AccessibleTextHelper_Impl > mpImpl; + const std::unique_ptr< AccessibleTextHelper_Impl > mpImpl; }; diff --git a/include/svx/databaselocationinput.hxx b/include/svx/databaselocationinput.hxx index b5af04f558a4..373305c71fda 100644 --- a/include/svx/databaselocationinput.hxx +++ b/include/svx/databaselocationinput.hxx @@ -74,7 +74,7 @@ namespace svx bool prepareCommit(); private: - ::std::auto_ptr< DatabaseLocationInputController_Impl > + ::std::unique_ptr< DatabaseLocationInputController_Impl > m_pImpl; }; diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index 800bb1a90f1e..46ca48af47eb 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -147,7 +147,7 @@ protected: void Init( const Size& rWinSize, const vcl::Font& rWinFont ); void SetSize( const Size& rWinSize ); }; - std::auto_ptr< DialControl_Impl > mpImpl; + std::unique_ptr< DialControl_Impl > mpImpl; virtual void HandleMouseEvent( const Point& rPos, bool bInitial ); virtual void HandleEscapeEvent(); diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx index 1d1309854a0e..63f96a747bf7 100644 --- a/include/svx/fmshell.hxx +++ b/include/svx/fmshell.hxx @@ -159,7 +159,7 @@ public: OutputDevice& i_rDevice ) const; - ::std::auto_ptr< ::svx::ISdrObjectFilter > + ::std::unique_ptr< ::svx::ISdrObjectFilter > CreateFocusableControlFilter( const SdrView& i_rView, const OutputDevice& i_rDevice diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx index 29d1ddfbfbfc..e92271b44d06 100644 --- a/include/svx/frmsel.hxx +++ b/include/svx/frmsel.hxx @@ -190,7 +190,7 @@ protected: virtual Size GetOptimalSize() const SAL_OVERRIDE; private: - std::auto_ptr< FrameSelectorImpl > mxImpl; + std::unique_ptr< FrameSelectorImpl > mxImpl; }; diff --git a/include/svx/orienthelper.hxx b/include/svx/orienthelper.hxx index c7946c94c16d..a830c1bed9eb 100644 --- a/include/svx/orienthelper.hxx +++ b/include/svx/orienthelper.hxx @@ -89,7 +89,7 @@ public: void EnableStackedTriState( bool bEnable = true ); private: - std::auto_ptr< OrientationHelper_Impl > mpImpl; + std::unique_ptr< OrientationHelper_Impl > mpImpl; }; diff --git a/include/svx/shapepropertynotifier.hxx b/include/svx/shapepropertynotifier.hxx index a1ebfe12f9ca..5d9f90b56b50 100644 --- a/include/svx/shapepropertynotifier.hxx +++ b/include/svx/shapepropertynotifier.hxx @@ -129,7 +129,7 @@ namespace svx void disposing(); private: - ::std::auto_ptr< PropertyChangeNotifier_Data > m_pData; + ::std::unique_ptr< PropertyChangeNotifier_Data > m_pData; }; diff --git a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx index b9e11ddd9792..9227f764faff 100644 --- a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx +++ b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx @@ -47,7 +47,7 @@ namespace sdr { namespace contact { class SVX_DLLPRIVATE ViewContactOfUnoControl : public ViewContactOfSdrObj { private: - ::std::auto_ptr< ViewContactOfUnoControl_Impl > m_pImpl; + ::std::unique_ptr< ViewContactOfUnoControl_Impl > m_pImpl; public: // access to SdrObject diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 123e0b2f07e1..cb31bd0e001a 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -269,12 +269,8 @@ namespace accessibility if( mrObj.GetModel() ) EndListening( *mrObj.GetModel() ); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< SvxEditSource > pProxySource( new AccessibleProxyEditSource_Impl(mrObj, mrView, mrViewWindow) ); - ::std::auto_ptr< SvxEditSource > tmp = mpEditSource; - SAL_WNODEPRECATED_DECLARATIONS_POP - mpEditSource = pProxySource; - pProxySource = tmp; + ::std::unique_ptr< SvxEditSource > pProxySource( new AccessibleProxyEditSource_Impl(mrObj, mrView, mrViewWindow) ); + mpEditSource.swap(pProxySource); // register as listener StartListening( mpEditSource->GetBroadcaster() ); diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.hxx b/svx/source/accessibility/AccessibleEmptyEditSource.hxx index e0f5b01252d0..2138c76824b1 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.hxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.hxx @@ -77,9 +77,7 @@ namespace accessibility @dyn */ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr< SvxEditSource > mpEditSource; - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr< SvxEditSource > mpEditSource; SdrObject& mrObj; SdrView& mrView; diff --git a/svx/source/accessibility/AccessibleTextEventQueue.cxx b/svx/source/accessibility/AccessibleTextEventQueue.cxx index 985f4929d819..05ace5f490f3 100644 --- a/svx/source/accessibility/AccessibleTextEventQueue.cxx +++ b/svx/source/accessibility/AccessibleTextEventQueue.cxx @@ -67,14 +67,12 @@ namespace accessibility maEventQueue.push_back( new SvxEditSourceHint( rHint ) ); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< SfxHint > AccessibleTextEventQueue::PopFront() + ::std::unique_ptr< SfxHint > AccessibleTextEventQueue::PopFront() { - ::std::auto_ptr< SfxHint > aRes( *(maEventQueue.begin()) ); + ::std::unique_ptr< SfxHint > aRes( *(maEventQueue.begin()) ); maEventQueue.pop_front(); return aRes; } - SAL_WNODEPRECATED_DECLARATIONS_POP bool AccessibleTextEventQueue::IsEmpty() const { diff --git a/svx/source/accessibility/AccessibleTextEventQueue.hxx b/svx/source/accessibility/AccessibleTextEventQueue.hxx index 74cf7e09d06f..ba3859fe6bdd 100644 --- a/svx/source/accessibility/AccessibleTextEventQueue.hxx +++ b/svx/source/accessibility/AccessibleTextEventQueue.hxx @@ -60,7 +60,7 @@ namespace accessibility return first queue element, ownership transfers to caller */ - ::std::auto_ptr< SfxHint > PopFront(); + ::std::unique_ptr< SfxHint > PopFront(); /** Apply functor to every queue member diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 97a62ced63f2..751cb0df06cd 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -1222,9 +1222,7 @@ namespace accessibility while( !maEventQueue.IsEmpty() ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< SfxHint > pHint( maEventQueue.PopFront() ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< SfxHint > pHint( maEventQueue.PopFront() ); if( pHint.get() ) { const SfxHint& rHint = *(pHint.get()); diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 31ce9bcac9f8..1383fed692eb 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -1377,17 +1377,15 @@ namespace } -SAL_WNODEPRECATED_DECLARATIONS_PUSH -::std::auto_ptr< ::svx::ISdrObjectFilter > FmFormShell::CreateFocusableControlFilter( const SdrView& i_rView, const OutputDevice& i_rDevice ) const +::std::unique_ptr< ::svx::ISdrObjectFilter > FmFormShell::CreateFocusableControlFilter( const SdrView& i_rView, const OutputDevice& i_rDevice ) const { - ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter; + ::std::unique_ptr< ::svx::ISdrObjectFilter > pFilter; if ( !i_rView.IsDesignMode() ) pFilter.reset( new FocusableControlsFilter( i_rView, i_rDevice ) ); return pFilter; } -SAL_WNODEPRECATED_DECLARATIONS_POP SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxModel, const SdrView& _rView, const OutputDevice& _rDevice, Reference< XControl >& _out_rxControl ) const diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index ba83abac5989..653feff1774a 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1548,9 +1548,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO bool bNeedLabel = ( _nControlObjectID != OBJ_FM_CHECKBOX ); // the label - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< SdrUnoObj > pLabel; - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< SdrUnoObj > pLabel; Reference< XPropertySet > xLabelModel; if ( bNeedLabel ) { @@ -1581,10 +1579,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO } // the control - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< SdrUnoObj > pControl( dynamic_cast< SdrUnoObj* >( + ::std::unique_ptr< SdrUnoObj > pControl( dynamic_cast< SdrUnoObj* >( SdrObjFactory::MakeNewObject( _nInventor, _nControlObjectID, _pControlPage, _pModel ) ) ); - SAL_WNODEPRECATED_DECLARATIONS_POP OSL_ENSURE( pControl.get(), "FmXFormView::createControlLabelPair: could not create the control!" ); if ( !pControl.get() ) return false; diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx index 4888a4959554..470a4ef8700e 100644 --- a/svx/source/inc/formcontrolfactory.hxx +++ b/svx/source/inc/formcontrolfactory.hxx @@ -98,7 +98,7 @@ namespace svxform ); private: - ::std::auto_ptr< FormControlFactory_Data > m_pData; + ::std::unique_ptr< FormControlFactory_Data > m_pData; }; diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx index 8d794458b869..5ecc4be782ca 100644 --- a/svx/source/inc/formcontroller.hxx +++ b/svx/source/inc/formcontroller.hxx @@ -182,7 +182,7 @@ namespace svxform ::svxform::DelayedEvent m_aActivationEvent; ::svxform::DelayedEvent m_aDeactivationEvent; - ::std::auto_ptr< ColumnInfoCache > + ::std::unique_ptr< ColumnInfoCache > m_pColumnInfoCache; sal_Int32 m_nCurrentFilterPosition; // current level for filtering (or-criteria) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 774749db83d7..16d9a5466d11 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -18,6 +18,8 @@ */ #include <string> +#include <utility> + #include <tools/color.hxx> #include <svl/poolitem.hxx> #include <svl/eitem.hxx> @@ -165,9 +167,7 @@ class SvxFontNameBox_Impl : public FontNameBox using Window::Update; private: const FontList* pFontList; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<FontList> m_aOwnFontList; - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr<FontList> m_aOwnFontList; vcl::Font aCurFont; Size aLogicalSize; OUString aCurText; @@ -210,9 +210,7 @@ public: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - void SetOwnFontList(::std::auto_ptr<FontList> _aOwnFontList) { m_aOwnFontList = _aOwnFontList; } - SAL_WNODEPRECATED_DECLARATIONS_POP + void SetOwnFontList(::std::unique_ptr<FontList> && _aOwnFontList) { m_aOwnFontList = std::move(_aOwnFontList); } }; // SelectHdl needs the Modifiers, get them in MouseButtonUp @@ -745,11 +743,9 @@ static bool lcl_GetDocFontList( const FontList** ppFontList, SvxFontNameBox_Impl (SvxFontListItem*)pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ); else { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<FontList> aFontList(new FontList( pBox )); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr<FontList> aFontList(new FontList( pBox )); *ppFontList = aFontList.get(); - pBox->SetOwnFontList(aFontList); + pBox->SetOwnFontList(std::move(aFontList)); bChanged = true; } @@ -1021,7 +1017,7 @@ void SvxFontNameBox_Impl::Select() FontNameBox::Select(); Sequence< PropertyValue > aArgs( 1 ); - std::auto_ptr<SvxFontItem> pFontItem; + std::unique_ptr<SvxFontItem> pFontItem; if ( pFontList ) { vcl::FontInfo aInfo( pFontList->Get( GetText(), diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 991033f1a3c8..151212e4198d 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <memory> + #include <sfx2/request.hxx> #include <svl/eitem.hxx> #include <basic/sbxvar.hxx> @@ -40,8 +44,6 @@ #include <svx/fmshell.hxx> #include <svx/sdrobjectfilter.hxx> -#include <boost/scoped_ptr.hpp> - using namespace ::com::sun::star; void SwTextShell::ExecBasicMove(SfxRequest &rReq) @@ -325,7 +327,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq) if ( !pFormShell || !pDrawView || !pWindow ) break; - boost::scoped_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter( + std::unique_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter( *pDrawView, *pWindow ) ); if ( !pFilter.get() ) break; |