diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-11 17:16:32 +0200 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2017-05-02 20:49:50 -0400 |
commit | 624a4372bf4271046ec8a827417f89b27f32cc95 (patch) | |
tree | 9971b45ebc7944dd439d94c808599f968ae5c2cc | |
parent | 25e1080b27eb528b041459833b36986f00c01780 (diff) |
rename ScCaptionPtr (mb|set)InUndo to (mb|set)NotOwner
... which better suits the general purpose we'll need
Change-Id: I32805c91d17180d5f18225a02c8a436826242e19
-rw-r--r-- | sc/inc/postit.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/postit.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/undo/undocell.cxx | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index 45621844def7..a2010f8dd99e 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -86,7 +86,7 @@ public: bool forget(); /** Flag that this instance is in Undo, so drawing layer owns it. */ - void setInUndo(); + void setNotOwner(); oslInterlockedCount getRefs() const; @@ -104,7 +104,7 @@ private: Head* mpHead; ///< points to the "master" entry mutable ScCaptionPtr* mpNext; ///< next in list SdrCaptionObj* mpCaption; ///< the caption object, managed by head master - bool mbInUndo; ///< whether this caption object is held in Undo + bool mbNotOwner; ///< whether this caption object is owned by something else, e.g. held in Undo /* TODO: can that be moved to Head? * It's unclear when to reset, so * each instance has its own flag. diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 907e471d155a..1f694abd545a 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -445,12 +445,12 @@ ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& r ScCaptionPtr::ScCaptionPtr() : - mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr), mbInUndo(false) + mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr), mbNotOwner(false) { } ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) : - mpHead(nullptr), mpNext(nullptr), mpCaption(p), mbInUndo(false) + mpHead(nullptr), mpNext(nullptr), mpCaption(p), mbNotOwner(false) { if (p) { @@ -459,7 +459,7 @@ ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) : } ScCaptionPtr::ScCaptionPtr( const ScCaptionPtr& r ) : - mpHead(r.mpHead), mpCaption(r.mpCaption), mbInUndo(false) + mpHead(r.mpHead), mpCaption(r.mpCaption), mbNotOwner(false) { if (r.mpCaption) { @@ -477,7 +477,7 @@ ScCaptionPtr::ScCaptionPtr( const ScCaptionPtr& r ) : } ScCaptionPtr::ScCaptionPtr( ScCaptionPtr&& r ) : - mpHead(r.mpHead), mpNext(r.mpNext), mpCaption(r.mpCaption), mbInUndo(false) + mpHead(r.mpHead), mpNext(r.mpNext), mpCaption(r.mpCaption), mbNotOwner(false) { r.replaceInList( this ); r.mpCaption = nullptr; @@ -534,9 +534,9 @@ ScCaptionPtr& ScCaptionPtr::operator=( const ScCaptionPtr& r ) return *this; } -void ScCaptionPtr::setInUndo() +void ScCaptionPtr::setNotOwner() { - mbInUndo = true; + mbNotOwner = true; } ScCaptionPtr::Head::Head( ScCaptionPtr* p ) : @@ -697,7 +697,7 @@ void ScCaptionPtr::decRefAndDestroy() mpCaption = nullptr; #else // Destroying Draw Undo deletes its SdrObject, don't attempt that twice. - if (!mbInUndo) + if (!mbNotOwner) { removeFromDrawPageAndFree( true ); // ignoring Undo if (mpCaption) diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 1e39da276459..44a56627b214 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -712,12 +712,12 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP if (bInsert) { maNewData = rNoteData; - maNewData.mxCaption.setInUndo(); + maNewData.mxCaption.setNotOwner(); } else { maOldData = rNoteData; - maOldData.mxCaption.setInUndo(); + maOldData.mxCaption.setNotOwner(); } } @@ -731,8 +731,8 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP { OSL_ENSURE( maOldData.mxCaption || maNewData.mxCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" ); OSL_ENSURE( !maOldData.mxInitData.get() && !maNewData.mxInitData.get(), "ScUndoReplaceNote::ScUndoReplaceNote - unexpected unitialized note" ); - maOldData.mxCaption.setInUndo(); - maNewData.mxCaption.setInUndo(); + maOldData.mxCaption.setNotOwner(); + maNewData.mxCaption.setNotOwner(); } ScUndoReplaceNote::~ScUndoReplaceNote() |