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
9d2642d2
Kaydet (Commit)
9d2642d2
authored
Ara 06, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use a std::list<> instead of a Ring<>
Change-Id: Ibc1d2deae5b0c7841ec83de880380170eadbd509
üst
29a4edae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
27 deletions
+18
-27
doccomp.cxx
sw/source/core/doc/doccomp.cxx
+18
-27
No files found.
sw/source/core/doc/doccomp.cxx
Dosyayı görüntüle @
9d2642d2
...
@@ -44,7 +44,8 @@
...
@@ -44,7 +44,8 @@
#include <vector>
#include <vector>
#include <set>
#include <list>
#include <deque>
#include <cctype>
#include <cctype>
#include <boost/scoped_array.hpp>
#include <boost/scoped_array.hpp>
...
@@ -1839,7 +1840,7 @@ public:
...
@@ -1839,7 +1840,7 @@ public:
{
return
GetNextInRing
();
}
{
return
GetNextInRing
();
}
_SaveMergeRedlines
*
GetPrev
()
_SaveMergeRedlines
*
GetPrev
()
{
return
GetPrevInRing
();
}
{
return
GetPrevInRing
();
}
static
sal_uInt16
InsertRedline
(
_SaveMergeRedlines
*
pRing
,
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
);
static
sal_uInt16
InsertRedline
(
_SaveMergeRedlines
*
pRing
,
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
,
SwPaM
*
pLastDestRedline
);
};
};
_SaveMergeRedlines
::
_SaveMergeRedlines
(
const
SwNode
&
rDstNd
,
_SaveMergeRedlines
::
_SaveMergeRedlines
(
const
SwNode
&
rDstNd
,
...
@@ -1868,7 +1869,7 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
...
@@ -1868,7 +1869,7 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
}
}
}
}
sal_uInt16
_SaveMergeRedlines
::
InsertRedline
(
_SaveMergeRedlines
*
pRing
,
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
)
sal_uInt16
_SaveMergeRedlines
::
InsertRedline
(
_SaveMergeRedlines
*
pRing
,
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
,
SwPaM
*
pLastDestRedline
)
{
{
sal_uInt16
nIns
=
0
;
sal_uInt16
nIns
=
0
;
SwDoc
*
pDoc
=
pDestRedl
->
GetDoc
();
SwDoc
*
pDoc
=
pDestRedl
->
GetDoc
();
...
@@ -1896,12 +1897,8 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline(_SaveMergeRedlines* pRing, const Sw
...
@@ -1896,12 +1897,8 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline(_SaveMergeRedlines* pRing, const Sw
pDestRedl
->
GetMark
()
->
nContent
.
Assign
(
aSaveNd
.
GetNode
().
GetCntntNode
(),
pDestRedl
->
GetMark
()
->
nContent
.
Assign
(
aSaveNd
.
GetNode
().
GetCntntNode
(),
nSaveCnt
);
nSaveCnt
);
if
(
!
pRing
->
unique
()
)
if
(
pLastDestRedline
&&
*
pLastDestRedline
->
GetPoint
()
==
*
pDestRedl
->
GetPoint
()
)
{
*
pLastDestRedline
->
GetPoint
()
=
*
pDestRedl
->
GetMark
();
SwPaM
*
pTmpPrev
=
pRing
->
GetPrev
()
->
pDestRedl
;
if
(
pTmpPrev
&&
*
pTmpPrev
->
GetPoint
()
==
*
pDestRedl
->
GetPoint
()
)
*
pTmpPrev
->
GetPoint
()
=
*
pDestRedl
->
GetMark
();
}
}
}
else
else
{
{
...
@@ -2031,7 +2028,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
...
@@ -2031,7 +2028,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
// we want to get all redlines from the SourceDoc
// we want to get all redlines from the SourceDoc
// look for all insert redlines from the SourceDoc and determine their position in the DestDoc
// look for all insert redlines from the SourceDoc and determine their position in the DestDoc
_SaveMergeRedlines
*
pRing
=
0
;
std
::
list
<
_SaveMergeRedlines
>
vRedlines
;
const
SwRedlineTbl
&
rSrcRedlTbl
=
rSrcDoc
.
getIDocumentRedlineAccess
().
GetRedlineTbl
();
const
SwRedlineTbl
&
rSrcRedlTbl
=
rSrcDoc
.
getIDocumentRedlineAccess
().
GetRedlineTbl
();
sal_uLong
nEndOfExtra
=
rSrcDoc
.
GetNodes
().
GetEndOfExtras
().
GetIndex
();
sal_uLong
nEndOfExtra
=
rSrcDoc
.
GetNodes
().
GetEndOfExtras
().
GetIndex
();
sal_uLong
nMyEndOfExtra
=
GetNodes
().
GetEndOfExtras
().
GetIndex
();
sal_uLong
nMyEndOfExtra
=
GetNodes
().
GetEndOfExtras
().
GetIndex
();
...
@@ -2048,32 +2045,26 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
...
@@ -2048,32 +2045,26 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
// Found the position.
// Found the position.
// Then we also have to insert the redline to the line in the DestDoc.
// Then we also have to insert the redline to the line in the DestDoc.
_SaveMergeRedlines
*
pTmp
=
new
_SaveMergeRedlines
(
vRedlines
.
push_back
(
_SaveMergeRedlines
(
*
pDstNd
,
*
pRedl
,
nullptr
));
*
pDstNd
,
*
pRedl
,
pRing
);
if
(
!
pRing
)
pRing
=
pTmp
;
}
}
}
}
if
(
pRing
)
if
(
!
vRedlines
.
empty
()
)
{
{
// Carry over all into DestDoc
// Carry over all into DestDoc
rSrcDoc
.
getIDocumentRedlineAccess
().
SetRedlineMode
((
RedlineMode_t
)(
nsRedlineMode_t
::
REDLINE_SHOW_INSERT
|
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
));
rSrcDoc
.
getIDocumentRedlineAccess
().
SetRedlineMode
((
RedlineMode_t
)(
nsRedlineMode_t
::
REDLINE_SHOW_INSERT
|
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
));
getIDocumentRedlineAccess
().
SetRedlineMode
((
RedlineMode_t
)(
getIDocumentRedlineAccess
().
SetRedlineMode
((
RedlineMode_t
)(
nsRedlineMode_t
::
REDLINE_ON
|
nsRedlineMode_t
::
REDLINE_ON
|
nsRedlineMode_t
::
REDLINE_SHOW_INSERT
|
nsRedlineMode_t
::
REDLINE_SHOW_INSERT
|
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
));
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
));
_SaveMergeRedlines
*
pTmp
=
pRing
;
SwPaM
*
pLastDestRedline
(
nullptr
);
for
(
_SaveMergeRedlines
&
rRedline
:
vRedlines
)
do
{
{
nRet
+=
pTmp
->
InsertRedline
(
pTmp
,
pTmp
->
pSrcRedl
,
pTmp
->
pDestRedl
);
nRet
+=
_SaveMergeRedlines
::
InsertRedline
(
&
rRedline
,
rRedline
.
pSrcRedl
,
rRedline
.
pDestRedl
,
pLastDestRedline
);
}
while
(
pRing
!=
(
pTmp
=
pTmp
->
GetNext
())
);
pLastDestRedline
=
rRedline
.
pDestRedl
;
}
while
(
pRing
!=
pRing
->
GetNext
()
)
delete
pRing
->
GetNext
();
delete
pRing
;
}
}
}
}
...
...
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