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
d3bdadad
Kaydet (Commit)
d3bdadad
authored
Agu 15, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Agu 16, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert pRedoStack in SdrModel class from Container to std::deque
Change-Id: I0535175c4881a1ea55d7cb7361ae78bb81aa10c6
üst
aa2d9729
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
svdmodel.hxx
svx/inc/svx/svdmodel.hxx
+3
-3
svdmodel.cxx
svx/source/svdraw/svdmodel.cxx
+9
-6
No files found.
svx/inc/svx/svdmodel.hxx
Dosyayı görüntüle @
d3bdadad
...
@@ -193,7 +193,7 @@ protected:
...
@@ -193,7 +193,7 @@ protected:
SfxStyleSheet
*
pDefaultStyleSheet
;
SfxStyleSheet
*
pDefaultStyleSheet
;
sfx2
::
LinkManager
*
pLinkManager
;
// LinkManager
sfx2
::
LinkManager
*
pLinkManager
;
// LinkManager
std
::
deque
<
SfxUndoAction
*>*
pUndoStack
;
std
::
deque
<
SfxUndoAction
*>*
pUndoStack
;
Container
*
pRedoStack
;
std
::
deque
<
SfxUndoAction
*>*
pRedoStack
;
SdrUndoGroup
*
pAktUndoGroup
;
// Fuer mehrstufige
SdrUndoGroup
*
pAktUndoGroup
;
// Fuer mehrstufige
sal_uInt16
nUndoLevel
;
// Undo-Klammerung
sal_uInt16
nUndoLevel
;
// Undo-Klammerung
sal_uInt16
nProgressPercent
;
// fuer den ProgressBar-Handler
sal_uInt16
nProgressPercent
;
// fuer den ProgressBar-Handler
...
@@ -579,8 +579,8 @@ public:
...
@@ -579,8 +579,8 @@ public:
sal_uIntPtr
GetUndoActionCount
()
const
{
return
pUndoStack
!=
NULL
?
pUndoStack
->
size
()
:
0
;
}
sal_uIntPtr
GetUndoActionCount
()
const
{
return
pUndoStack
!=
NULL
?
pUndoStack
->
size
()
:
0
;
}
const
SfxUndoAction
*
GetUndoAction
(
sal_uIntPtr
nNum
)
const
{
return
(
SfxUndoAction
*
)(
pUndoStack
!=
NULL
?
(
*
pUndoStack
)[
nNum
]
:
NULL
);
}
const
SfxUndoAction
*
GetUndoAction
(
sal_uIntPtr
nNum
)
const
{
return
(
SfxUndoAction
*
)(
pUndoStack
!=
NULL
?
(
*
pUndoStack
)[
nNum
]
:
NULL
);
}
// RedoAction(0) ist die aktuelle (also die des letzten Undo)
// RedoAction(0) ist die aktuelle (also die des letzten Undo)
sal_uIntPtr
GetRedoActionCount
()
const
{
return
pRedoStack
!=
NULL
?
pRedoStack
->
Count
()
:
0
;
}
sal_uIntPtr
GetRedoActionCount
()
const
{
return
pRedoStack
!=
NULL
?
pRedoStack
->
size
()
:
0
;
}
const
SfxUndoAction
*
GetRedoAction
(
sal_uIntPtr
nNum
)
const
{
return
(
SfxUndoAction
*
)(
pRedoStack
!=
NULL
?
pRedoStack
->
GetObject
(
nNum
)
:
NULL
);
}
const
SfxUndoAction
*
GetRedoAction
(
sal_uIntPtr
nNum
)
const
{
return
(
SfxUndoAction
*
)(
pRedoStack
!=
NULL
?
(
*
pRedoStack
)[
nNum
]
:
NULL
);
}
bool
Undo
();
bool
Undo
();
bool
Redo
();
bool
Redo
();
...
...
svx/source/svdraw/svdmodel.cxx
Dosyayı görüntüle @
d3bdadad
...
@@ -422,8 +422,9 @@ void SdrModel::ClearUndoBuffer()
...
@@ -422,8 +422,9 @@ void SdrModel::ClearUndoBuffer()
pUndoStack
=
NULL
;
pUndoStack
=
NULL
;
}
}
if
(
pRedoStack
!=
NULL
)
{
if
(
pRedoStack
!=
NULL
)
{
while
(
pRedoStack
->
Count
()
!=
0
)
{
while
(
!
pRedoStack
->
empty
())
{
delete
(
SfxUndoAction
*
)
pRedoStack
->
Remove
(
pRedoStack
->
Count
()
-
1
);
delete
pRedoStack
->
back
();
pRedoStack
->
pop_back
();
}
}
delete
pRedoStack
;
delete
pRedoStack
;
pRedoStack
=
NULL
;
pRedoStack
=
NULL
;
...
@@ -446,10 +447,10 @@ bool SdrModel::Undo()
...
@@ -446,10 +447,10 @@ bool SdrModel::Undo()
mbUndoEnabled
=
false
;
mbUndoEnabled
=
false
;
pDo
->
Undo
();
pDo
->
Undo
();
if
(
pRedoStack
==
NULL
)
if
(
pRedoStack
==
NULL
)
pRedoStack
=
new
Container
(
1024
,
16
,
16
)
;
pRedoStack
=
new
std
::
deque
<
SfxUndoAction
*>
;
SfxUndoAction
*
p
=
pUndoStack
->
front
();
SfxUndoAction
*
p
=
pUndoStack
->
front
();
pUndoStack
->
pop_front
();
pUndoStack
->
pop_front
();
pRedoStack
->
Insert
(
p
,(
sal_uIntPtr
)
0
);
pRedoStack
->
push_front
(
p
);
mbUndoEnabled
=
bWasUndoEnabled
;
mbUndoEnabled
=
bWasUndoEnabled
;
}
}
}
}
...
@@ -473,7 +474,9 @@ bool SdrModel::Redo()
...
@@ -473,7 +474,9 @@ bool SdrModel::Redo()
pDo
->
Redo
();
pDo
->
Redo
();
if
(
pUndoStack
==
NULL
)
if
(
pUndoStack
==
NULL
)
pUndoStack
=
new
std
::
deque
<
SfxUndoAction
*>
;
pUndoStack
=
new
std
::
deque
<
SfxUndoAction
*>
;
pUndoStack
->
push_front
((
SfxUndoAction
*
)
pRedoStack
->
Remove
((
sal_uIntPtr
)
0
));
SfxUndoAction
*
p
=
pRedoStack
->
front
();
pRedoStack
->
pop_front
();
pUndoStack
->
push_front
(
p
);
mbUndoEnabled
=
bWasUndoEnabled
;
mbUndoEnabled
=
bWasUndoEnabled
;
}
}
}
}
...
@@ -522,7 +525,7 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
...
@@ -522,7 +525,7 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
pUndoStack
->
pop_back
();
pUndoStack
->
pop_back
();
}
}
if
(
pRedoStack
!=
NULL
)
if
(
pRedoStack
!=
NULL
)
pRedoStack
->
C
lear
();
pRedoStack
->
c
lear
();
}
}
}
}
else
else
...
...
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