Kaydet (Commit) fb515368 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

fpicker (Windows): std::auto_ptr -> std::unique_ptr

Change-Id: Id373c3ed6e483a501e07146812ff04353eafcc32
üst a5e52149
...@@ -76,7 +76,7 @@ CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xSer ...@@ -76,7 +76,7 @@ CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xSer
SAL_WARN_IF( !hInstance, "fpicker", "The name of the service dll must have changed" ); SAL_WARN_IF( !hInstance, "fpicker", "The name of the service dll must have changed" );
// create a default FileOpen dialog without any additional ui elements // create a default FileOpen dialog without any additional ui elements
m_pImpl = std::auto_ptr< CWinFileOpenImpl >( m_pImpl = std::unique_ptr< CWinFileOpenImpl >(
new CWinFileOpenImpl( new CWinFileOpenImpl(
this, this,
true, true,
...@@ -682,7 +682,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments) ...@@ -682,7 +682,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
// create a new impl-class here based on the // create a new impl-class here based on the
// given string, if the given string is empty // given string, if the given string is empty
// we do nothing // we do nothing
m_pImpl = std::auto_ptr< CWinFileOpenImpl >( m_pImpl = std::unique_ptr< CWinFileOpenImpl >(
new CWinFileOpenImpl( new CWinFileOpenImpl(
this, this,
bFileOpenDialog, bFileOpenDialog,
......
...@@ -231,7 +231,7 @@ private: ...@@ -231,7 +231,7 @@ private:
private: private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services
CAsyncEventNotifier m_aAsyncEventNotifier; CAsyncEventNotifier m_aAsyncEventNotifier;
std::auto_ptr<CWinFileOpenImpl> m_pImpl; std::unique_ptr<CWinFileOpenImpl> m_pImpl;
}; };
#endif #endif
......
...@@ -156,8 +156,8 @@ protected: ...@@ -156,8 +156,8 @@ protected:
// singleton instance of this class // singleton instance of this class
virtual ~CFilePreview( ); virtual ~CFilePreview( );
// we use the stl auto_ptr class as singleton destroyer // we use the stl unique_ptr class as singleton destroyer
typedef std::auto_ptr< CFilePreview > FILEPREVIEW_SINGLETON_DESTROYER_T; typedef std::unique_ptr< CFilePreview > FILEPREVIEW_SINGLETON_DESTROYER_T;
protected: protected:
virtual void SAL_CALL onPaint( HWND hWnd, HDC hDC ); virtual void SAL_CALL onPaint( HWND hWnd, HDC hDC );
......
...@@ -197,10 +197,10 @@ private: ...@@ -197,10 +197,10 @@ private:
static BOOL CALLBACK EnumChildWndProc( HWND hWnd, LPARAM lParam ); static BOOL CALLBACK EnumChildWndProc( HWND hWnd, LPARAM lParam );
private: private:
std::auto_ptr<CFilterContainer> m_filterContainer; std::unique_ptr<CFilterContainer> m_filterContainer;
std::auto_ptr<CPreviewAdapter> m_Preview; std::unique_ptr<CPreviewAdapter> m_Preview;
std::auto_ptr<CCustomControlFactory> m_CustomControlFactory; std::unique_ptr<CCustomControlFactory> m_CustomControlFactory;
std::auto_ptr<CCustomControl> m_CustomControls; std::unique_ptr<CCustomControl> m_CustomControls;
CFilePicker* m_FilePicker; CFilePicker* m_FilePicker;
WNDPROC m_pfnOldDlgProc; WNDPROC m_pfnOldDlgProc;
OUString m_defaultName; OUString m_defaultName;
......
...@@ -260,7 +260,7 @@ void SAL_CALL CAsyncEventNotifier::run() ...@@ -260,7 +260,7 @@ void SAL_CALL CAsyncEventNotifier::run()
{ {
while (getEventListSize() > 0) while (getEventListSize() > 0)
{ {
std::auto_ptr<CEventNotification> EventNotification(getNextEventRecord()); std::unique_ptr<CEventNotification> EventNotification(getNextEventRecord());
removeNextEventRecord(); removeNextEventRecord();
::cppu::OInterfaceContainerHelper* pICHelper = ::cppu::OInterfaceContainerHelper* pICHelper =
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
// the client inherits the ownership of the returned // the client inherits the ownership of the returned
// CControlCommandResult and has to delete it or he may // CControlCommandResult and has to delete it or he may
// use the auto_ptr template for automatic deletion // use the unique_ptr template for automatic deletion
virtual CControlCommandResult* SAL_CALL handleRequest( CControlCommandRequest* aRequest ); virtual CControlCommandResult* SAL_CALL handleRequest( CControlCommandRequest* aRequest );
// clients of this method should use the returned // clients of this method should use the returned
......
...@@ -86,7 +86,7 @@ protected: ...@@ -86,7 +86,7 @@ protected:
// member // member
protected: protected:
HINSTANCE m_Instance; HINSTANCE m_Instance;
std::auto_ptr<PreviewBase> m_Preview; std::unique_ptr<PreviewBase> m_Preview;
HWND m_FileDialog; HWND m_FileDialog;
int m_RightMargin; int m_RightMargin;
......
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
private: private:
// hide implementation details using the // hide implementation details using the
// bridge pattern // bridge pattern
std::auto_ptr<CPreviewAdapterImpl> m_pImpl; std::unique_ptr<CPreviewAdapterImpl> m_pImpl;
// prevent copy and assignment // prevent copy and assignment
private: private:
......
...@@ -64,7 +64,7 @@ namespace ...@@ -64,7 +64,7 @@ namespace
CFolderPicker::CFolderPicker( const Reference< XMultiServiceFactory >& xServiceMgr ) : CFolderPicker::CFolderPicker( const Reference< XMultiServiceFactory >& xServiceMgr ) :
m_xServiceMgr( xServiceMgr ) m_xServiceMgr( xServiceMgr )
{ {
m_pFolderPickerImpl = std::auto_ptr< CWinFolderPickerImpl > ( new CWinFolderPickerImpl( this ) ); m_pFolderPickerImpl = std::unique_ptr< CWinFolderPickerImpl > ( new CWinFolderPickerImpl( this ) );
} }
......
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
private: private:
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
std::auto_ptr< CWinFolderPickerImpl > m_pFolderPickerImpl; std::unique_ptr< CWinFolderPickerImpl > m_pFolderPickerImpl;
osl::Mutex m_aMutex; osl::Mutex m_aMutex;
// prevent copy and assignment // prevent copy and assignment
......
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