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
9abb98e0
Kaydet (Commit)
9abb98e0
authored
Eki 12, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:mergeclass, merge CompareLine with SwCompareLine
Change-Id: Id423939377e6ebb0881a9a7361d6baedbf87931c
üst
4038b27a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
50 deletions
+28
-50
mergeclasses.results
compilerplugins/clang/mergeclasses.results
+0
-1
doccomp.cxx
sw/source/core/doc/doccomp.cxx
+28
-49
No files found.
compilerplugins/clang/mergeclasses.results
Dosyayı görüntüle @
9abb98e0
...
...
@@ -2,7 +2,6 @@ merge (anonymous namespace)::Data with cppu::PropertySetMixinImpl::Impl
merge AbstractMailMergeWizard with AbstractMailMergeWizard_Impl
merge AbstractSwInsertDBColAutoPilot with AbstractSwInsertDBColAutoPilot_Impl
merge CffGlobal with CffSubsetterContext
merge CompareLine with SwCompareLine
merge DomVisitor with DomExport
merge DownloadInteractionHandler with UpdateCheck
merge EscherPersistTable with EscherEx
...
...
sw/source/core/doc/doccomp.cxx
Dosyayı görüntüle @
9abb98e0
...
...
@@ -54,16 +54,32 @@ using namespace ::com::sun::star;
using
::
std
::
vector
;
class
CompareLine
class
Sw
CompareLine
{
const
SwNode
&
rNode
;
public
:
CompareLine
()
{}
virtual
~
CompareLine
();
explicit
SwCompareLine
(
const
SwNode
&
rNd
)
:
rNode
(
rNd
)
{}
sal_uLong
GetHashValue
()
const
;
bool
Compare
(
const
SwCompareLine
&
rLine
)
const
;
static
sal_uLong
GetTextNodeHashValue
(
const
SwTextNode
&
rNd
,
sal_uLong
nVal
);
static
bool
CompareNode
(
const
SwNode
&
rDstNd
,
const
SwNode
&
rSrcNd
);
static
bool
CompareTextNd
(
const
SwTextNode
&
rDstNd
,
const
SwTextNode
&
rSrcNd
);
bool
ChangesInLine
(
const
SwCompareLine
&
rLine
,
SwPaM
*&
rpInsRing
,
SwPaM
*&
rpDelRing
)
const
;
const
SwNode
&
GetNode
()
const
{
return
rNode
;
}
virtual
sal_uLong
GetHashValue
()
const
=
0
;
virtual
bool
Compare
(
const
CompareLine
&
rLine
)
const
=
0
;
const
SwNode
&
GetEndNode
()
const
;
// for debugging
OUString
GetText
()
const
;
};
class
CompareData
{
protected
:
...
...
@@ -77,7 +93,7 @@ private:
static
sal_uLong
PrevIdx
(
const
SwNode
*
pNd
);
static
sal_uLong
NextIdx
(
const
SwNode
*
pNd
);
vector
<
CompareLine
*
>
aLines
;
vector
<
Sw
CompareLine
*
>
aLines
;
bool
m_bRecordDiff
;
// Truncate beginning and end and add all others to the LinesArray
...
...
@@ -124,9 +140,9 @@ public:
}
size_t
GetLineCount
()
const
{
return
aLines
.
size
();
}
const
CompareLine
*
GetLine
(
size_t
nLine
)
const
const
Sw
CompareLine
*
GetLine
(
size_t
nLine
)
const
{
return
aLines
[
nLine
];
}
void
InsertLine
(
CompareLine
*
pLine
)
void
InsertLine
(
Sw
CompareLine
*
pLine
)
{
aLines
.
push_back
(
pLine
);
}
void
SetRedlinesToDoc
(
bool
bUseDocInfo
);
...
...
@@ -167,7 +183,7 @@ class Hash
struct
_HashData
{
sal_uLong
nNext
,
nHash
;
const
CompareLine
*
pLine
;
const
Sw
CompareLine
*
pLine
;
_HashData
()
:
nNext
(
0
),
nHash
(
0
),
pLine
(
0
)
{}
...
...
@@ -372,8 +388,6 @@ public:
}
};
CompareLine
::~
CompareLine
()
{}
CompareData
::~
CompareData
()
{
if
(
pDelRing
)
...
...
@@ -541,7 +555,7 @@ void Hash::CalcHashValue( CompareData& rData )
{
for
(
size_t
n
=
0
;
n
<
rData
.
GetLineCount
();
++
n
)
{
const
CompareLine
*
pLine
=
rData
.
GetLine
(
n
);
const
Sw
CompareLine
*
pLine
=
rData
.
GetLine
(
n
);
OSL_ENSURE
(
pLine
,
"where is the line?"
);
sal_uLong
nH
=
pLine
->
GetHashValue
();
...
...
@@ -989,41 +1003,6 @@ void Compare::ShiftBoundaries( CompareData& rData1, CompareData& rData2 )
lcl_ShiftBoundariesOneway
(
&
rData2
,
&
rData1
);
}
class
SwCompareLine
:
public
CompareLine
{
const
SwNode
&
rNode
;
public
:
explicit
SwCompareLine
(
const
SwNode
&
rNd
);
virtual
~
SwCompareLine
();
virtual
sal_uLong
GetHashValue
()
const
override
;
virtual
bool
Compare
(
const
CompareLine
&
rLine
)
const
override
;
static
sal_uLong
GetTextNodeHashValue
(
const
SwTextNode
&
rNd
,
sal_uLong
nVal
);
static
bool
CompareNode
(
const
SwNode
&
rDstNd
,
const
SwNode
&
rSrcNd
);
static
bool
CompareTextNd
(
const
SwTextNode
&
rDstNd
,
const
SwTextNode
&
rSrcNd
);
bool
ChangesInLine
(
const
SwCompareLine
&
rLine
,
SwPaM
*&
rpInsRing
,
SwPaM
*&
rpDelRing
)
const
;
const
SwNode
&
GetNode
()
const
{
return
rNode
;
}
const
SwNode
&
GetEndNode
()
const
;
// for debugging
OUString
GetText
()
const
;
};
SwCompareLine
::
SwCompareLine
(
const
SwNode
&
rNd
)
:
rNode
(
rNd
)
{
}
SwCompareLine
::~
SwCompareLine
()
{
}
sal_uLong
SwCompareLine
::
GetHashValue
()
const
{
sal_uLong
nRet
=
0
;
...
...
@@ -1083,7 +1062,7 @@ const SwNode& SwCompareLine::GetEndNode() const
return
*
pNd
;
}
bool
SwCompareLine
::
Compare
(
const
CompareLine
&
rLine
)
const
bool
SwCompareLine
::
Compare
(
const
Sw
CompareLine
&
rLine
)
const
{
return
CompareNode
(
rNode
,
static_cast
<
const
SwCompareLine
&>
(
rLine
).
rNode
);
}
...
...
@@ -1522,7 +1501,7 @@ void CompareData::ShowDelete(
static_cast
<
const
SwCompareLine
*>
(
rData
.
GetLine
(
nEnd
-
1
))
->
GetEndNode
(),
1
);
sal_uInt16
nOffset
=
0
;
const
CompareLine
*
pLine
=
0
;
const
Sw
CompareLine
*
pLine
=
0
;
if
(
nInsPos
>=
1
)
{
if
(
GetLineCount
()
==
nInsPos
)
...
...
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