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/source/ui/inc/DrawViewShell.hxx | |
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/source/ui/inc/DrawViewShell.hxx')
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 967c7e3ce1e5..42fbabe36d6a 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -432,7 +432,7 @@ private: content that are supported both by that content and by the DrawViewShell. */ - ::std::auto_ptr<SvxClipboardFmtItem> mpCurrentClipboardFormats; + ::std::unique_ptr<SvxClipboardFmtItem> mpCurrentClipboardFormats; /** On some occasions it is necessary to make SwitchPage calls asynchronously. @@ -504,8 +504,8 @@ private: using ViewShell::Notify; - ::std::auto_ptr< AnnotationManager > mpAnnotationManager; - ::std::auto_ptr< ViewOverlayManager > mpViewOverlayManager; + ::std::unique_ptr< AnnotationManager > mpAnnotationManager; + ::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager; }; } // end of namespace sd |