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
e8613c7e
Kaydet (Commit)
e8613c7e
authored
Şub 27, 2014
tarafından
Oliver-Rainer Wittmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
123480: assure correct Undo/Redo with not shown tracked changes
üst
9956ed13
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
107 deletions
+120
-107
docedt.cxx
sw/source/core/doc/docedt.cxx
+23
-25
docredln.cxx
sw/source/core/doc/docredln.cxx
+10
-6
edundo.cxx
sw/source/core/edit/edundo.cxx
+1
-1
UndoRedline.hxx
sw/source/core/inc/UndoRedline.hxx
+5
-5
undobj.cxx
sw/source/core/undo/undobj.cxx
+54
-43
unredln.cxx
sw/source/core/undo/unredln.cxx
+27
-27
No files found.
sw/source/core/doc/docedt.cxx
Dosyayı görüntüle @
e8613c7e
...
...
@@ -1561,50 +1561,48 @@ bool SwDoc::DeleteAndJoinWithRedlineImpl( SwPaM & rPam, const bool )
{
SwUndoRedlineDelete
*
pUndo
=
0
;
RedlineMode_t
eOld
=
GetRedlineMode
();
checkRedlining
(
eOld
);
checkRedlining
(
eOld
);
if
(
GetIDocumentUndoRedo
().
DoesUndo
())
{
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode
(
(
RedlineMode_t
)(
nsRedlineMode_t
::
REDLINE_ON
|
nsRedlineMode_t
::
REDLINE_SHOW_INSERT
|
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
)
);
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode
(
(
RedlineMode_t
)
(
nsRedlineMode_t
::
REDLINE_ON
|
nsRedlineMode_t
::
REDLINE_SHOW_INSERT
|
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
)
);
GetIDocumentUndoRedo
().
StartUndo
(
UNDO_EMPTY
,
NULL
);
GetIDocumentUndoRedo
().
StartUndo
(
UNDO_DELETE
,
NULL
);
pUndo
=
new
SwUndoRedlineDelete
(
rPam
,
UNDO_DELETE
);
GetIDocumentUndoRedo
().
AppendUndo
(
pUndo
);
GetIDocumentUndoRedo
().
AppendUndo
(
pUndo
);
}
if
(
*
rPam
.
GetPoint
()
!=
*
rPam
.
GetMark
()
)
AppendRedline
(
new
SwRedline
(
nsRedlineType_t
::
REDLINE_DELETE
,
rPam
),
true
);
if
(
*
rPam
.
GetPoint
()
!=
*
rPam
.
GetMark
()
)
AppendRedline
(
new
SwRedline
(
nsRedlineType_t
::
REDLINE_DELETE
,
rPam
),
true
);
SetModified
();
if
(
pUndo
)
if
(
pUndo
)
{
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_EMPTY
,
NULL
);
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_EMPTY
,
NULL
);
// ??? why the hell is the AppendUndo not below the
// CanGrouping, so this hideous cleanup wouldn't be necessary?
// bah, this is redlining, probably changing this would break it...
if
(
GetIDocumentUndoRedo
().
DoesGroupUndo
()
)
if
(
GetIDocumentUndoRedo
().
DoesGroupUndo
()
)
{
SwUndo
*
const
pLastUndo
(
GetUndoManager
().
GetLastUndo
()
);
SwUndoRedlineDelete
*
const
pUndoRedlineDel
(
dynamic_cast
<
SwUndoRedlineDelete
*>
(
pLastUndo
)
);
if
(
pUndoRedlineDel
)
SwUndo
*
const
pLastUndo
(
GetUndoManager
().
GetLastUndo
()
);
SwUndoRedlineDelete
*
const
pUndoRedlineDel
(
dynamic_cast
<
SwUndoRedlineDelete
*
>
(
pLastUndo
)
);
if
(
pUndoRedlineDel
)
{
bool
const
bMerged
=
pUndoRedlineDel
->
CanGrouping
(
*
pUndo
);
if
(
bMerged
)
bool
const
bMerged
=
pUndoRedlineDel
->
CanGrouping
(
*
pUndo
);
if
(
bMerged
)
{
::
sw
::
UndoGuard
const
undoGuard
(
GetIDocumentUndoRedo
());
SwUndo
const
*
const
pDeleted
=
GetUndoManager
().
RemoveLastUndo
();
OSL_ENSURE
(
pDeleted
==
pUndo
,
"DeleteAndJoinWithRedlineImpl: "
"undo removed is not undo inserted?"
);
::
sw
::
UndoGuard
const
undoGuard
(
GetIDocumentUndoRedo
()
);
SwUndo
const
*
const
pDeleted
=
GetUndoManager
().
RemoveLastUndo
();
OSL_ENSURE
(
pDeleted
==
pUndo
,
"DeleteAndJoinWithRedlineImpl: "
"undo removed is not undo inserted?"
);
delete
pDeleted
;
}
}
}
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode
(
eOld
);
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode
(
eOld
);
}
return
true
;
}
...
...
sw/source/core/doc/docredln.cxx
Dosyayı görüntüle @
e8613c7e
...
...
@@ -3013,12 +3013,16 @@ SwRedlineData::SwRedlineData( RedlineType_t eT, sal_uInt16 nAut )
aStamp
.
Set100Sec
(
0
);
}
SwRedlineData
::
SwRedlineData
(
const
SwRedlineData
&
rCpy
,
sal_Bool
bCpyNext
)
:
pNext
(
(
bCpyNext
&&
rCpy
.
pNext
)
?
new
SwRedlineData
(
*
rCpy
.
pNext
)
:
0
),
pExtraData
(
rCpy
.
pExtraData
?
rCpy
.
pExtraData
->
CreateNew
()
:
0
),
sComment
(
rCpy
.
sComment
),
aStamp
(
rCpy
.
aStamp
),
eType
(
rCpy
.
eType
),
nAuthor
(
rCpy
.
nAuthor
),
nSeqNo
(
rCpy
.
nSeqNo
)
SwRedlineData
::
SwRedlineData
(
const
SwRedlineData
&
rCpy
,
sal_Bool
bCpyNext
)
:
pNext
(
(
bCpyNext
&&
rCpy
.
pNext
)
?
new
SwRedlineData
(
*
rCpy
.
pNext
)
:
0
)
,
pExtraData
(
rCpy
.
pExtraData
?
rCpy
.
pExtraData
->
CreateNew
()
:
0
)
,
sComment
(
rCpy
.
sComment
)
,
aStamp
(
rCpy
.
aStamp
)
,
eType
(
rCpy
.
eType
)
,
nAuthor
(
rCpy
.
nAuthor
)
,
nSeqNo
(
rCpy
.
nSeqNo
)
{
}
...
...
sw/source/core/edit/edundo.cxx
Dosyayı görüntüle @
e8613c7e
...
...
@@ -125,7 +125,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
// Erkennung darf nur noch fuer die neue "Box" erfolgen!
ClearTblBoxCntnt
();
RedlineMode_t
eOld
=
GetDoc
()
->
GetRedlineMode
();
const
RedlineMode_t
eOld
=
GetDoc
()
->
GetRedlineMode
();
try
{
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
...
...
sw/source/core/inc/UndoRedline.hxx
Dosyayı görüntüle @
e8613c7e
...
...
@@ -38,10 +38,10 @@ class SwUndoDelete;
class
SwUndoRedline
:
public
SwUndo
,
public
SwUndRng
{
protected
:
SwRedlineData
*
pRedlData
;
SwRedlineSaveDatas
*
pRedlSaveData
;
SwUndoId
nUserId
;
sal_Bool
bHiddenRedlines
;
SwRedlineData
*
m
pRedlData
;
SwRedlineSaveDatas
*
m
pRedlSaveData
;
SwUndoId
m
nUserId
;
sal_Bool
m
bHiddenRedlines
;
virtual
void
UndoRedlineImpl
(
SwDoc
&
rDoc
,
SwPaM
&
rPam
);
virtual
void
RedoRedlineImpl
(
SwDoc
&
rDoc
,
SwPaM
&
rPam
);
...
...
@@ -54,7 +54,7 @@ public:
virtual
void
UndoImpl
(
::
sw
::
UndoRedoContext
&
);
virtual
void
RedoImpl
(
::
sw
::
UndoRedoContext
&
);
SwUndoId
GetUserId
()
const
{
return
nUserId
;
}
SwUndoId
GetUserId
()
const
{
return
m
nUserId
;
}
sal_uInt16
GetRedlSaveCount
()
const
;
};
...
...
sw/source/core/undo/undobj.cxx
Dosyayı görüntüle @
e8613c7e
...
...
@@ -47,17 +47,23 @@
#include <comcore.hrc>
#include <docsh.hxx>
class
SwRedlineSaveData
:
public
SwUndRng
,
public
SwRedlineData
,
private
SwUndoSaveSection
class
SwRedlineSaveData
:
public
SwUndRng
,
public
SwRedlineData
,
private
SwUndoSaveSection
{
public
:
SwRedlineSaveData
(
SwComparePosition
eCmpPos
,
const
SwPosition
&
rSttPos
,
const
SwPosition
&
rEndPos
,
SwRedline
&
rRedl
,
sal_Bool
bCopyNext
);
SwRedlineSaveData
(
SwComparePosition
eCmpPos
,
const
SwPosition
&
rSttPos
,
const
SwPosition
&
rEndPos
,
SwRedline
&
rRedl
);
~
SwRedlineSaveData
();
void
RedlineToDoc
(
SwPaM
&
rPam
);
SwNodeIndex
*
GetMvSttIdx
()
const
{
return
SwUndoSaveSection
::
GetMvSttIdx
();
}
{
return
SwUndoSaveSection
::
GetMvSttIdx
();
}
#ifdef DBG_UTIL
sal_uInt16
nRedlineCount
;
...
...
@@ -246,7 +252,7 @@ void SwUndo::UndoWithContext(SfxUndoContext & rContext)
dynamic_cast
<
::
sw
::
UndoRedoContext
*
>
(
&
rContext
));
OSL_ASSERT
(
pContext
);
if
(
!
pContext
)
{
return
;
}
UndoRedoRedlineGuard
(
*
pContext
,
*
this
);
const
UndoRedoRedlineGuard
a
UndoRedoRedlineGuard
(
*
pContext
,
*
this
);
UndoImpl
(
*
pContext
);
}
...
...
@@ -256,7 +262,7 @@ void SwUndo::RedoWithContext(SfxUndoContext & rContext)
dynamic_cast
<
::
sw
::
UndoRedoContext
*
>
(
&
rContext
));
OSL_ASSERT
(
pContext
);
if
(
!
pContext
)
{
return
;
}
UndoRedoRedlineGuard
(
*
pContext
,
*
this
);
const
UndoRedoRedlineGuard
a
UndoRedoRedlineGuard
(
*
pContext
,
*
this
);
RedoImpl
(
*
pContext
);
}
...
...
@@ -990,18 +996,17 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos
// sicher und setze die RedlineDaten
SwRedlineSaveData
::
SwRedlineSaveData
(
SwComparePosition
eCmpPos
,
const
SwPosition
&
rStt
Pos
,
const
SwPosition
&
rEnd
Pos
,
SwRedline
&
rRedl
,
sal_Bool
bCopyNext
)
:
SwUndRng
(
rRedl
)
,
SwRedlineData
(
rRedl
.
GetRedlineData
(),
bCopyNext
)
SwRedlineSaveData
::
SwRedlineSaveData
(
SwComparePosition
eCmp
Pos
,
const
SwPosition
&
rStt
Pos
,
const
SwPosition
&
rEndPos
,
SwRedline
&
rRedl
)
:
SwUndRng
(
rRedl
)
,
SwRedlineData
(
rRedl
.
GetRedlineData
(),
sal_True
)
{
ASSERT
(
POS_OUTSIDE
==
eCmpPos
||
!
rRedl
.
GetContentIdx
(),
"Redline mit Content"
);
ASSERT
(
POS_OUTSIDE
==
eCmpPos
||
!
rRedl
.
GetContentIdx
(),
"Redline mit Content"
);
switch
(
eCmpPos
)
switch
(
eCmpPos
)
{
case
POS_OVERLAP_BEFORE
:
// Pos1 ueberlappt Pos2 am Anfang
nEndNode
=
rEndPos
.
nNode
.
GetIndex
();
...
...
@@ -1020,7 +1025,7 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
break
;
case
POS_OUTSIDE
:
// Pos2 liegt vollstaendig in Pos1
if
(
rRedl
.
GetContentIdx
()
)
if
(
rRedl
.
GetContentIdx
()
)
{
// dann den Bereich ins UndoArray verschieben und merken
SaveSection
(
rRedl
.
GetDoc
(),
*
rRedl
.
GetContentIdx
()
);
...
...
@@ -1078,39 +1083,48 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam )
rDoc
.
SetRedlineMode_intern
(
eOld
);
}
sal_Bool
SwUndo
::
FillSaveData
(
const
SwPaM
&
rRange
,
SwRedlineSaveDatas
&
rSData
,
sal_Bool
bDelRange
,
sal_Bool
bCopyNext
)
sal_Bool
SwUndo
::
FillSaveData
(
const
SwPaM
&
rRange
,
SwRedlineSaveDatas
&
rSData
,
sal_Bool
bDelRange
,
sal_Bool
bCopyNext
)
{
if
(
rSData
.
Count
()
)
if
(
rSData
.
Count
()
)
{
rSData
.
DeleteAndDestroy
(
0
,
rSData
.
Count
()
);
}
SwRedlineSaveData
*
pNewData
;
const
SwPosition
*
pStt
=
rRange
.
Start
(),
*
pEnd
=
rRange
.
End
();
const
SwPosition
*
pStt
=
rRange
.
Start
();
const
SwPosition
*
pEnd
=
rRange
.
End
();
const
SwRedlineTbl
&
rTbl
=
rRange
.
GetDoc
()
->
GetRedlineTbl
();
sal_uInt16
n
=
0
;
rRange
.
GetDoc
()
->
GetRedline
(
*
pStt
,
&
n
);
for
(
;
n
<
rTbl
.
Count
();
++
n
)
for
(
;
n
<
rTbl
.
Count
();
++
n
)
{
SwRedline
*
pRedl
=
rTbl
[
n
];
const
SwPosition
*
pRStt
=
pRedl
->
Start
(),
*
pREnd
=
pRedl
->
End
();
SwComparePosition
eCmpPos
=
ComparePosition
(
*
pStt
,
*
pEnd
,
*
pRStt
,
*
pREnd
);
if
(
POS_BEFORE
!=
eCmpPos
&&
POS_BEHIND
!=
eCmpPos
&&
POS_COLLIDE_END
!=
eCmpPos
&&
POS_COLLIDE_START
!=
eCmpPos
)
SwRedline
*
pRedl
=
rTbl
[
n
];
const
SwComparePosition
eCmpPos
=
ComparePosition
(
*
pStt
,
*
pEnd
,
*
pRedl
->
Start
(),
*
pRedl
->
End
()
);
if
(
eCmpPos
!=
POS_BEFORE
&&
eCmpPos
!=
POS_BEHIND
&&
eCmpPos
!=
POS_COLLIDE_END
&&
eCmpPos
!=
POS_COLLIDE_START
)
{
pNewData
=
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
,
bCopyNext
);
pNewData
=
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
);
rSData
.
Insert
(
pNewData
,
rSData
.
Count
()
);
}
}
if
(
rSData
.
Count
()
&&
bDelRange
)
if
(
rSData
.
Count
()
&&
bDelRange
)
rRange
.
GetDoc
()
->
DeleteRedline
(
rRange
,
false
,
USHRT_MAX
);
return
0
!=
rSData
.
Count
();
}
sal_Bool
SwUndo
::
FillSaveDataForFmt
(
const
SwPaM
&
rRange
,
SwRedlineSaveDatas
&
rSData
)
sal_Bool
SwUndo
::
FillSaveDataForFmt
(
const
SwPaM
&
rRange
,
SwRedlineSaveDatas
&
rSData
)
{
if
(
rSData
.
Count
()
)
if
(
rSData
.
Count
()
)
rSData
.
DeleteAndDestroy
(
0
,
rSData
.
Count
()
);
SwRedlineSaveData
*
pNewData
;
...
...
@@ -1118,23 +1132,20 @@ sal_Bool SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rS
const
SwRedlineTbl
&
rTbl
=
rRange
.
GetDoc
()
->
GetRedlineTbl
();
sal_uInt16
n
=
0
;
rRange
.
GetDoc
()
->
GetRedline
(
*
pStt
,
&
n
);
for
(
;
n
<
rTbl
.
Count
();
++
n
)
for
(
;
n
<
rTbl
.
Count
();
++
n
)
{
SwRedline
*
pRedl
=
rTbl
[
n
];
if
(
nsRedlineType_t
::
REDLINE_FORMAT
==
pRedl
->
GetType
()
)
SwRedline
*
pRedl
=
rTbl
[
n
];
if
(
nsRedlineType_t
::
REDLINE_FORMAT
==
pRedl
->
GetType
()
)
{
const
SwPosition
*
pRStt
=
pRedl
->
Start
(),
*
pREnd
=
pRedl
->
End
();
SwComparePosition
eCmpPos
=
ComparePosition
(
*
pStt
,
*
pEnd
,
*
pRStt
,
*
pREnd
);
if
(
POS_BEFORE
!=
eCmpPos
&&
POS_BEHIND
!=
eCmpPos
&&
POS_COLLIDE_END
!=
eCmpPos
&&
POS_COLLIDE_START
!=
eCmpPos
)
if
(
POS_BEFORE
!=
eCmpPos
&&
POS_BEHIND
!=
eCmpPos
&&
POS_COLLIDE_END
!=
eCmpPos
&&
POS_COLLIDE_START
!=
eCmpPos
)
{
pNewData
=
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
,
sal_True
);
pNewData
=
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
);
rSData
.
Insert
(
pNewData
,
rSData
.
Count
()
);
}
}
}
return
0
!=
rSData
.
Count
();
...
...
sw/source/core/undo/unredln.cxx
Dosyayı görüntüle @
e8613c7e
...
...
@@ -46,18 +46,18 @@ extern void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPr
SwUndoRedline
::
SwUndoRedline
(
SwUndoId
nUsrId
,
const
SwPaM
&
rRange
)
:
SwUndo
(
UNDO_REDLINE
),
SwUndRng
(
rRange
),
pRedlData
(
0
),
pRedlSaveData
(
0
),
nUserId
(
nUsrId
),
bHiddenRedlines
(
sal_False
)
mpRedlData
(
0
),
mpRedlSaveData
(
0
),
m
nUserId
(
nUsrId
),
m
bHiddenRedlines
(
sal_False
)
{
// Redline beachten
SwDoc
&
rDoc
=
*
rRange
.
GetDoc
();
if
(
rDoc
.
IsRedlineOn
()
)
{
switch
(
nUserId
)
switch
(
m
nUserId
)
{
case
UNDO_DELETE
:
case
UNDO_REPLACE
:
pRedlData
=
new
SwRedlineData
(
nsRedlineType_t
::
REDLINE_DELETE
,
rDoc
.
GetRedlineAuthor
()
);
m
pRedlData
=
new
SwRedlineData
(
nsRedlineType_t
::
REDLINE_DELETE
,
rDoc
.
GetRedlineAuthor
()
);
break
;
default
:
;
...
...
@@ -67,14 +67,14 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
sal_uLong
nEndExtra
=
rDoc
.
GetNodes
().
GetEndOfExtras
().
GetIndex
();
pRedlSaveData
=
new
SwRedlineSaveDatas
;
if
(
!
FillSaveData
(
rRange
,
*
pRedlSaveData
,
sal_False
,
UNDO_REJECT_REDLINE
!=
nUserId
))
delete
pRedlSaveData
,
pRedlSaveData
=
0
;
m
pRedlSaveData
=
new
SwRedlineSaveDatas
;
if
(
!
FillSaveData
(
rRange
,
*
m
pRedlSaveData
,
sal_False
,
UNDO_REJECT_REDLINE
!=
m
nUserId
))
delete
mpRedlSaveData
,
m
pRedlSaveData
=
0
;
else
{
bHiddenRedlines
=
HasHiddenRedlines
(
*
pRedlSaveData
);
if
(
bHiddenRedlines
)
// dann muessen die NodeIndizies
mbHiddenRedlines
=
HasHiddenRedlines
(
*
m
pRedlSaveData
);
if
(
mbHiddenRedlines
)
// dann muessen die NodeIndizies
{
// vom SwUndRng korrigiert werden
nEndExtra
-=
rDoc
.
GetNodes
().
GetEndOfExtras
().
GetIndex
();
nSttNode
-=
nEndExtra
;
...
...
@@ -85,13 +85,13 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
SwUndoRedline
::~
SwUndoRedline
()
{
delete
pRedlData
;
delete
pRedlSaveData
;
delete
m
pRedlData
;
delete
m
pRedlSaveData
;
}
sal_uInt16
SwUndoRedline
::
GetRedlSaveCount
()
const
{
return
pRedlSaveData
?
pRedlSaveData
->
Count
()
:
0
;
return
mpRedlSaveData
?
m
pRedlSaveData
->
Count
()
:
0
;
}
...
...
@@ -102,13 +102,13 @@ void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext)
UndoRedlineImpl
(
*
pDoc
,
rPam
);
if
(
pRedlSaveData
)
if
(
m
pRedlSaveData
)
{
sal_uLong
nEndExtra
=
pDoc
->
GetNodes
().
GetEndOfExtras
().
GetIndex
();
SetSaveData
(
*
pDoc
,
*
pRedlSaveData
);
if
(
bHiddenRedlines
)
SetSaveData
(
*
pDoc
,
*
m
pRedlSaveData
);
if
(
m
bHiddenRedlines
)
{
pRedlSaveData
->
DeleteAndDestroy
(
0
,
pRedlSaveData
->
Count
()
);
mpRedlSaveData
->
DeleteAndDestroy
(
0
,
m
pRedlSaveData
->
Count
()
);
nEndExtra
=
pDoc
->
GetNodes
().
GetEndOfExtras
().
GetIndex
()
-
nEndExtra
;
nSttNode
+=
nEndExtra
;
...
...
@@ -126,11 +126,11 @@ void SwUndoRedline::RedoImpl(::sw::UndoRedoContext & rContext)
pDoc
->
SetRedlineMode_intern
((
RedlineMode_t
)((
eOld
&
~
nsRedlineMode_t
::
REDLINE_IGNORE
)
|
nsRedlineMode_t
::
REDLINE_ON
));
SwPaM
&
rPam
(
AddUndoRedoPaM
(
rContext
)
);
if
(
pRedlSaveData
&&
bHiddenRedlines
)
if
(
mpRedlSaveData
&&
m
bHiddenRedlines
)
{
sal_uLong
nEndExtra
=
pDoc
->
GetNodes
().
GetEndOfExtras
().
GetIndex
();
FillSaveData
(
rPam
,
*
pRedlSaveData
,
sal_False
,
UNDO_REJECT_REDLINE
!=
nUserId
);
FillSaveData
(
rPam
,
*
m
pRedlSaveData
,
sal_False
,
UNDO_REJECT_REDLINE
!=
m
nUserId
);
nEndExtra
-=
pDoc
->
GetNodes
().
GetEndOfExtras
().
GetIndex
();
nSttNode
-=
nEndExtra
;
...
...
@@ -161,7 +161,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
bCanGroup
(
sal_False
),
bIsDelim
(
sal_False
),
bIsBackspace
(
sal_False
)
{
const
SwTxtNode
*
pTNd
;
if
(
UNDO_DELETE
==
nUserId
&&
if
(
UNDO_DELETE
==
m
nUserId
&&
nSttNode
==
nEndNode
&&
nSttCntnt
+
1
==
nEndCntnt
&&
0
!=
(
pTNd
=
rRange
.
GetNode
()
->
GetTxtNode
())
)
{
...
...
@@ -187,14 +187,14 @@ void SwUndoRedlineDelete::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
if
(
rPam
.
GetPoint
()
!=
rPam
.
GetMark
())
{
rDoc
.
AppendRedline
(
new
SwRedline
(
*
pRedlData
,
rPam
),
sal_False
);
rDoc
.
AppendRedline
(
new
SwRedline
(
*
m
pRedlData
,
rPam
),
sal_False
);
}
}
sal_Bool
SwUndoRedlineDelete
::
CanGrouping
(
const
SwUndoRedlineDelete
&
rNext
)
{
sal_Bool
bRet
=
sal_False
;
if
(
UNDO_DELETE
==
nUserId
&&
nUserId
==
rNext
.
nUserId
&&
if
(
UNDO_DELETE
==
mnUserId
&&
mnUserId
==
rNext
.
m
nUserId
&&
bCanGroup
==
rNext
.
bCanGroup
&&
bIsDelim
==
rNext
.
bIsDelim
&&
bIsBackspace
==
rNext
.
bIsBackspace
&&
...
...
@@ -209,10 +209,10 @@ sal_Bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
bIsEnd
=
-
1
;
if
(
bIsEnd
&&
((
!
pRedlSaveData
&&
!
rNext
.
pRedlSaveData
)
||
(
pRedlSaveData
&&
rNext
.
pRedlSaveData
&&
SwUndo
::
CanRedlineGroup
(
*
pRedlSaveData
,
*
rNext
.
pRedlSaveData
,
1
!=
bIsEnd
)
((
!
mpRedlSaveData
&&
!
rNext
.
m
pRedlSaveData
)
||
(
mpRedlSaveData
&&
rNext
.
m
pRedlSaveData
&&
SwUndo
::
CanRedlineGroup
(
*
m
pRedlSaveData
,
*
rNext
.
m
pRedlSaveData
,
1
!=
bIsEnd
)
)))
{
if
(
1
==
bIsEnd
)
...
...
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