diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-11 17:16:32 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-04-11 19:06:36 +0200 |
commit | e777618a59b6a66207d416b7b4dd3e77c2662260 (patch) | |
tree | b08b5dc17b067f4938d0fead4b8fe0a3ccd5a422 | |
parent | 87d4fd3b13f4dad7b043a776124e947bd0517014 (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 a630aef271db..d9584e1e7005 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 d2ef02f37b22..78cd43a6a5c2 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 202acdd26f45..7db4c9065500 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() |