summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-04-10 23:24:00 +0200
committerJan Holesovsky <kendy@collabora.com>2017-05-15 21:59:06 +0200
commit26337c1307a1cdee72b2d457cd0d210227662e29 (patch)
treeca86c164b7e0b4c570726a64fb4e31f111d5343e /sc/source
parent21049854751bcc2b1f42947181eed3ee2a39404b (diff)
introduce ScCaptionPtr InUndo
Change-Id: Iccc2671b61f524244107233b77b56aaa45f5c72a
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/postit.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 60225e639f74..8f0f00200d76 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)
+ mpHead(nullptr), mpNext(nullptr), mpCaption(nullptr), mbInUndo(false)
{
}
ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) :
- mpHead(nullptr), mpNext(nullptr), mpCaption(p)
+ mpHead(nullptr), mpNext(nullptr), mpCaption(p), mbInUndo(false)
{
if (p)
{
@@ -459,7 +459,7 @@ ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) :
}
ScCaptionPtr::ScCaptionPtr( const ScCaptionPtr& r ) :
- mpHead(r.mpHead), mpCaption(r.mpCaption)
+ mpHead(r.mpHead), mpCaption(r.mpCaption), mbInUndo(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)
+ mpHead(r.mpHead), mpNext(r.mpNext), mpCaption(r.mpCaption), mbInUndo(false)
{
r.replaceInList( this );
r.mpCaption = nullptr;
@@ -534,6 +534,11 @@ ScCaptionPtr& ScCaptionPtr::operator=( const ScCaptionPtr& r )
return *this;
}
+void ScCaptionPtr::setInUndo()
+{
+ mbInUndo = true;
+}
+
ScCaptionPtr::Head::Head( ScCaptionPtr* p ) :
mpFirst(p), mnRefs(1)
{