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
a71fb1c9
Kaydet (Commit)
a71fb1c9
authored
Ara 06, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rename to simple SaveMergeRedline and put in namespace
Change-Id: Ibc36dcde1778ee02b9ac173d9da8419b69854af6
üst
a7afdad2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
doccomp.cxx
sw/source/core/doc/doccomp.cxx
+15
-12
No files found.
sw/source/core/doc/doccomp.cxx
Dosyayı görüntüle @
a71fb1c9
...
@@ -1828,15 +1828,18 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
...
@@ -1828,15 +1828,18 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
return
nRet
;
return
nRet
;
}
}
struct
_SaveMergeRedlines
namespace
{
{
const
SwRangeRedline
*
pSrcRedl
;
struct
SaveMergeRedline
SwRangeRedline
*
pDestRedl
;
{
_SaveMergeRedlines
(
const
SwNode
&
rDstNd
,
const
SwRangeRedline
&
rSrcRedl
);
const
SwRangeRedline
*
pSrcRedl
;
static
sal_uInt16
InsertRedline
(
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
,
SwPaM
*
pLastDestRedline
);
SwRangeRedline
*
pDestRedl
;
};
SaveMergeRedline
(
const
SwNode
&
rDstNd
,
const
SwRangeRedline
&
rSrcRedl
);
static
sal_uInt16
InsertRedline
(
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
,
SwPaM
*
pLastDestRedline
);
};
}
_SaveMergeRedlines
::
_SaveMergeRedlines
(
const
SwNode
&
rDstNd
,
SaveMergeRedline
::
SaveMergeRedline
(
const
SwNode
&
rDstNd
,
const
SwRangeRedline
&
rSrcRedl
)
const
SwRangeRedline
&
rSrcRedl
)
:
pSrcRedl
(
&
rSrcRedl
)
:
pSrcRedl
(
&
rSrcRedl
)
{
{
...
@@ -1862,7 +1865,7 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
...
@@ -1862,7 +1865,7 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
}
}
}
}
sal_uInt16
_SaveMergeRedlines
::
InsertRedline
(
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
,
SwPaM
*
pLastDestRedline
)
sal_uInt16
SaveMergeRedline
::
InsertRedline
(
const
SwRangeRedline
*
pSrcRedl
,
SwRangeRedline
*
pDestRedl
,
SwPaM
*
pLastDestRedline
)
{
{
sal_uInt16
nIns
=
0
;
sal_uInt16
nIns
=
0
;
SwDoc
*
pDoc
=
pDestRedl
->
GetDoc
();
SwDoc
*
pDoc
=
pDestRedl
->
GetDoc
();
...
@@ -2021,7 +2024,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
...
@@ -2021,7 +2024,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
std
::
list
<
_SaveMergeRedlines
>
vRedlines
;
std
::
list
<
SaveMergeRedline
>
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
();
...
@@ -2038,7 +2041,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
...
@@ -2038,7 +2041,7 @@ 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.
vRedlines
.
push_back
(
_SaveMergeRedlines
(
*
pDstNd
,
*
pRedl
));
vRedlines
.
push_back
(
SaveMergeRedline
(
*
pDstNd
,
*
pRedl
));
}
}
}
}
...
@@ -2053,9 +2056,9 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
...
@@ -2053,9 +2056,9 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
));
nsRedlineMode_t
::
REDLINE_SHOW_DELETE
));
SwPaM
*
pLastDestRedline
(
nullptr
);
SwPaM
*
pLastDestRedline
(
nullptr
);
for
(
_SaveMergeRedlines
&
rRedline
:
vRedlines
)
for
(
SaveMergeRedline
&
rRedline
:
vRedlines
)
{
{
nRet
+=
_SaveMergeRedlines
::
InsertRedline
(
rRedline
.
pSrcRedl
,
rRedline
.
pDestRedl
,
pLastDestRedline
);
nRet
+=
SaveMergeRedline
::
InsertRedline
(
rRedline
.
pSrcRedl
,
rRedline
.
pDestRedl
,
pLastDestRedline
);
pLastDestRedline
=
rRedline
.
pDestRedl
;
pLastDestRedline
=
rRedline
.
pDestRedl
;
}
}
}
}
...
...
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