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
e4b0d63c
Kaydet (Commit)
e4b0d63c
authored
Ock 31, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Extract SfxUndoAction::dumpAsXml() from sw
Change-Id: I7ec2071150c03b61f3f681dbd26968ae3c535742
üst
d2a6d6a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
undo.hxx
include/svl/undo.hxx
+2
-0
undo.cxx
svl/source/undo/undo.cxx
+21
-0
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+1
-19
No files found.
include/svl/undo.hxx
Dosyayı görüntüle @
e4b0d63c
...
...
@@ -71,6 +71,7 @@ public:
virtual
OUString
GetComment
()
const
;
virtual
OUString
GetRepeatComment
(
SfxRepeatTarget
&
)
const
;
virtual
sal_uInt16
GetId
()
const
;
virtual
void
dumpAsXml
(
struct
_xmlTextWriter
*
pWriter
)
const
;
private
:
SfxUndoAction
(
const
SfxUndoAction
&
);
// disabled
...
...
@@ -159,6 +160,7 @@ public:
virtual
sal_uInt16
GetId
()
const
SAL_OVERRIDE
;
void
SetComment
(
const
OUString
&
rComment
);
void
dumpAsXml
(
struct
_xmlTextWriter
*
pWriter
)
const
SAL_OVERRIDE
;
};
...
...
svl/source/undo/undo.cxx
Dosyayı görüntüle @
e4b0d63c
...
...
@@ -24,6 +24,7 @@
#include <osl/mutex.hxx>
#include <comphelper/flagguard.hxx>
#include <tools/diagnose_ex.h>
#include <libxml/xmlwriter.h>
#include <vector>
#include <list>
...
...
@@ -135,6 +136,14 @@ bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
return
true
;
}
void
SfxUndoAction
::
dumpAsXml
(
xmlTextWriterPtr
pWriter
)
const
{
xmlTextWriterStartElement
(
pWriter
,
BAD_CAST
(
"sfxUndoAction"
));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"symbol"
),
BAD_CAST
(
typeid
(
*
this
).
name
()));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"comment"
),
BAD_CAST
(
GetComment
().
toUtf8
().
getStr
()));
xmlTextWriterEndElement
(
pWriter
);
}
struct
MarkedUndoAction
{
SfxUndoAction
*
pAction
;
...
...
@@ -1372,6 +1381,18 @@ bool SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
return
!
aUndoActions
.
empty
()
&&
aUndoActions
[
aUndoActions
.
size
()
-
1
].
pAction
->
Merge
(
pNextAction
);
}
void
SfxListUndoAction
::
dumpAsXml
(
xmlTextWriterPtr
pWriter
)
const
{
xmlTextWriterStartElement
(
pWriter
,
BAD_CAST
(
"sfxListUndoAction"
));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"size"
),
BAD_CAST
(
OString
::
number
(
aUndoActions
.
size
()).
getStr
()));
SfxUndoAction
::
dumpAsXml
(
pWriter
);
for
(
size_t
i
=
0
;
i
<
aUndoActions
.
size
();
++
i
)
aUndoActions
.
GetUndoAction
(
i
)
->
dumpAsXml
(
pWriter
);
xmlTextWriterEndElement
(
pWriter
);
}
/**
* Creates a LinkAction which points to another UndoManager.
* Gets that UndoManagers current Action and sets it as that UndoManager's
...
...
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
e4b0d63c
...
...
@@ -656,24 +656,6 @@ void SwExtraRedlineTbl::dumpAsXml( xmlTextWriterPtr w ) const
writer
.
endElement
(
);
// swextraredlinetbl
}
void
lcl_dumpSfxUndoAction
(
WriterHelper
&
writer
,
SfxUndoAction
*
pAction
)
{
writer
.
startElement
(
"undoAction"
);
writer
.
writeFormatAttribute
(
"symbol"
,
"%s"
,
BAD_CAST
(
typeid
(
*
pAction
).
name
()));
writer
.
writeFormatAttribute
(
"comment"
,
"%s"
,
BAD_CAST
(
OUStringToOString
(
pAction
->
GetComment
(),
RTL_TEXTENCODING_UTF8
).
getStr
()));
if
(
SfxListUndoAction
*
pList
=
dynamic_cast
<
SfxListUndoAction
*>
(
pAction
))
{
writer
.
startElement
(
"list"
);
writer
.
writeFormatAttribute
(
"size"
,
TMP_FORMAT
,
pList
->
aUndoActions
.
size
());
for
(
size_t
i
=
0
;
i
<
pList
->
aUndoActions
.
size
();
++
i
)
lcl_dumpSfxUndoAction
(
writer
,
pList
->
aUndoActions
.
GetUndoAction
(
i
));
writer
.
endElement
();
}
writer
.
endElement
();
}
void
sw
::
UndoManager
::
dumpAsXml
(
xmlTextWriterPtr
w
)
{
WriterHelper
writer
(
w
);
...
...
@@ -682,7 +664,7 @@ void sw::UndoManager::dumpAsXml(xmlTextWriterPtr w)
writer
.
writeFormatAttribute
(
"nUndoActionCount"
,
TMP_FORMAT
,
GetUndoActionCount
());
for
(
size_t
i
=
0
;
i
<
GetUndoActionCount
();
++
i
)
lcl_dumpSfxUndoAction
(
writer
,
GetUndoAction
(
i
)
);
GetUndoAction
(
i
)
->
dumpAsXml
(
w
);
writer
.
endElement
();
}
...
...
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