Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
98940fc9
Kaydet (Commit)
98940fc9
authored
Nis 10, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
introduce ScCaptionPtr InUndo
Change-Id: Iccc2671b61f524244107233b77b56aaa45f5c72a
üst
71f94273
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
postit.hxx
sc/inc/postit.hxx
+11
-0
postit.cxx
sc/source/core/data/postit.cxx
+9
-4
No files found.
sc/inc/postit.hxx
Dosyayı görüntüle @
98940fc9
...
...
@@ -85,6 +85,9 @@ public:
*/
bool
forget
();
/** Flag that this instance is in Undo, so drawing layer owns it. */
void
setInUndo
();
oslInterlockedCount
getRefs
()
const
;
private
:
...
...
@@ -101,6 +104,14 @@ 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
/* TODO: can that be moved to Head?
* It's unclear when to reset, so
* each instance has its own flag.
* The last reference count
* decrement automatically has the
* then current state available.
* */
void
newHead
();
//< Allocate a new Head and init.
void
incRef
()
const
;
...
...
sc/source/core/data/postit.cxx
Dosyayı görüntüle @
98940fc9
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment