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
1b6e9f9d
Kaydet (Commit)
1b6e9f9d
authored
Ara 06, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Pimplize SfxUndoActions.
Change-Id: I35ef457111f4cf8b811a4ee8bb676421746e1d9d
üst
c0533a46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
25 deletions
+66
-25
undo.hxx
include/svl/undo.hxx
+12
-25
undo.cxx
svl/source/undo/undo.cxx
+54
-0
No files found.
include/svl/undo.hxx
Dosyayı görüntüle @
1b6e9f9d
...
@@ -99,38 +99,25 @@ struct MarkedUndoAction
...
@@ -99,38 +99,25 @@ struct MarkedUndoAction
class
SfxUndoActions
class
SfxUndoActions
{
{
private
:
struct
Impl
;
::
std
::
vector
<
MarkedUndoAction
>
m_aActions
;
Impl
*
mpImpl
;
public
:
public
:
SfxUndoActions
()
SfxUndoActions
()
;
{
SfxUndoActions
(
const
SfxUndoActions
&
r
);
}
~
SfxUndoActions
();
bool
empty
()
const
{
return
m_aActions
.
empty
();
}
bool
empty
()
const
;
size_t
size
()
const
{
return
m_aActions
.
size
();
}
size_t
size
()
const
;
const
MarkedUndoAction
&
operator
[](
size_t
i
)
const
{
return
m_aActions
[
i
];
}
const
MarkedUndoAction
&
operator
[](
size_t
i
)
const
;
MarkedUndoAction
&
operator
[](
size_t
i
)
{
return
m_aActions
[
i
];
}
MarkedUndoAction
&
operator
[](
size_t
i
);
void
Remove
(
size_t
i_pos
)
void
Remove
(
size_t
i_pos
);
{
void
Remove
(
size_t
i_pos
,
size_t
i_count
);
m_aActions
.
erase
(
m_aActions
.
begin
()
+
i_pos
);
void
Insert
(
SfxUndoAction
*
i_action
,
size_t
i_pos
);
}
void
Remove
(
size_t
i_pos
,
size_t
i_count
)
{
m_aActions
.
erase
(
m_aActions
.
begin
()
+
i_pos
,
m_aActions
.
begin
()
+
i_pos
+
i_count
);
}
void
Insert
(
SfxUndoAction
*
i_action
,
size_t
i_pos
)
{
m_aActions
.
insert
(
m_aActions
.
begin
()
+
i_pos
,
MarkedUndoAction
(
i_action
)
);
}
};
};
/** do not make use of these implementation details, unless you
/** do not make use of these implementation details, unless you
really really have to! */
really really have to! */
struct
SVL_DLLPUBLIC
SfxUndoArray
struct
SVL_DLLPUBLIC
SfxUndoArray
...
...
svl/source/undo/undo.cxx
Dosyayı görüntüle @
1b6e9f9d
...
@@ -135,6 +135,60 @@ bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
...
@@ -135,6 +135,60 @@ bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
return
true
;
return
true
;
}
}
struct
SfxUndoActions
::
Impl
{
std
::
vector
<
MarkedUndoAction
>
maActions
;
};
SfxUndoActions
::
SfxUndoActions
()
:
mpImpl
(
new
Impl
)
{}
SfxUndoActions
::
SfxUndoActions
(
const
SfxUndoActions
&
r
)
:
mpImpl
(
new
Impl
)
{
mpImpl
->
maActions
=
r
.
mpImpl
->
maActions
;
}
SfxUndoActions
::~
SfxUndoActions
()
{
delete
mpImpl
;
}
bool
SfxUndoActions
::
empty
()
const
{
return
mpImpl
->
maActions
.
empty
();
}
size_t
SfxUndoActions
::
size
()
const
{
return
mpImpl
->
maActions
.
size
();
}
const
MarkedUndoAction
&
SfxUndoActions
::
operator
[](
size_t
i
)
const
{
return
mpImpl
->
maActions
[
i
];
}
MarkedUndoAction
&
SfxUndoActions
::
operator
[](
size_t
i
)
{
return
mpImpl
->
maActions
[
i
];
}
void
SfxUndoActions
::
Remove
(
size_t
i_pos
)
{
mpImpl
->
maActions
.
erase
(
mpImpl
->
maActions
.
begin
()
+
i_pos
);
}
void
SfxUndoActions
::
Remove
(
size_t
i_pos
,
size_t
i_count
)
{
mpImpl
->
maActions
.
erase
(
mpImpl
->
maActions
.
begin
()
+
i_pos
,
mpImpl
->
maActions
.
begin
()
+
i_pos
+
i_count
);
}
void
SfxUndoActions
::
Insert
(
SfxUndoAction
*
i_action
,
size_t
i_pos
)
{
mpImpl
->
maActions
.
insert
(
mpImpl
->
maActions
.
begin
()
+
i_pos
,
MarkedUndoAction
(
i_action
)
);
}
typedef
::
std
::
vector
<
SfxUndoListener
*
>
UndoListeners
;
typedef
::
std
::
vector
<
SfxUndoListener
*
>
UndoListeners
;
...
...
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