diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-01 15:03:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-01 17:35:08 +0200 |
commit | 4281abdfa8a417f7ba47c466410e1cbfed4342e0 (patch) | |
tree | e63ad9c555ef59f0c4d46a4b394d8c27ce6b70ef /sd/inc | |
parent | 2d1e026e7a148761d30db77c57f36cceff3d327d (diff) |
sd: std::auto_ptr -> std::unique_ptr
ToolBarManager::Implementation::Update in sd/source/ui/view/ToolBarManager.cxx
is dubious. It takes its parameter by value (so in UnlockUpdate() the passed-in
mpSynchronousLayouterLock is reset upon passing it in), but the comment that it
"is [...] released at its end" together with the redundant
pLocalLayouterLock.reset() at the end of Update() make it look as though the
intention was to pass by reference. However, resetting
mpSynchronousLayouterLock even in the case where pass-by-ref would fail to reset
it is apparently important, as otherwise e.g. JunitTest_svx_unoapi would run
into the OSL_ASSERT(mpSynchronousLayouterLock.get()==NULL) in LockUpdate() with
a call stack of ... -> Update -> SetValid -> UpdateLockImplementation ->
LockUpdate.
Change-Id: I7d2717d5e1f8aa69c79a626c100d7fefb0cfb120
Diffstat (limited to 'sd/inc')
-rw-r--r-- | sd/inc/Outliner.hxx | 2 | ||||
-rw-r--r-- | sd/inc/drawdoc.hxx | 4 | ||||
-rw-r--r-- | sd/inc/sdmod.hxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index c05993d68ed2..4999b48d1dac 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -176,7 +176,7 @@ public: private: class Implementation; - ::std::auto_ptr<Implementation> mpImpl; + ::std::unique_ptr<Implementation> mpImpl; /// Specifies whether to search and replace, to spell check or to do a /// text conversion. diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index f31f371f2319..6cd99ce335cf 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -181,8 +181,8 @@ private: CharClass* mpCharClass; ::com::sun::star::lang::Locale* mpLocale; - ::std::auto_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher; - ::std::auto_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher; + ::std::unique_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher; + ::std::unique_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher; SAL_DLLPRIVATE void UpdatePageObjectsInNotes(sal_uInt16 nStartPos); SAL_DLLPRIVATE void UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement); diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index d182a301bf6a..b1b42915500f 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -148,7 +148,7 @@ private: /** The resource container controls the lifetime of some singletons. */ - ::std::auto_ptr< ::sd::SdGlobalResourceContainer> mpResourceContainer; + ::std::unique_ptr< ::sd::SdGlobalResourceContainer> mpResourceContainer; /** Create a new summary page. When the document has been created in the kiosk mode with automatical transitions then this method adds |