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
d5d46849
Kaydet (Commit)
d5d46849
authored
Ara 20, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make SwNodeIndex constructors inline
Change-Id: Ib29bcd5e2028c4e644621af4294c193f5b0aa14e
üst
7a6639fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
65 deletions
+37
-65
ndindex.hxx
sw/inc/ndindex.hxx
+37
-11
ndindex.cxx
sw/source/core/docnode/ndindex.cxx
+0
-54
No files found.
sw/inc/ndindex.hxx
Dosyayı görüntüle @
d5d46849
...
...
@@ -36,7 +36,8 @@ class SW_DLLPUBLIC SwNodeIndex SAL_FINAL : public sw::Ring<SwNodeIndex>
{
SwNode
*
pNd
;
void
Remove
();
void
Remove
()
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
};
// These are not allowed!
SwNodeIndex
(
SwNodes
&
rNds
,
sal_uInt16
nIdx
);
...
...
@@ -57,9 +58,30 @@ class SW_DLLPUBLIC SwNodeIndex SAL_FINAL : public sw::Ring<SwNodeIndex>
}
public
:
SwNodeIndex
(
SwNodes
&
rNds
,
sal_uLong
nIdx
=
0
);
SwNodeIndex
(
const
SwNodeIndex
&
,
long
nDiff
=
0
);
SwNodeIndex
(
const
SwNode
&
,
long
nDiff
=
0
);
SwNodeIndex
(
SwNodes
&
rNds
,
sal_uLong
nIdx
=
0
)
:
pNd
(
rNds
[
nIdx
]
)
{
RegisterIndex
(
rNds
);
};
SwNodeIndex
(
const
SwNodeIndex
&
rIdx
,
long
nDiff
=
0
)
:
sw
::
Ring
<
SwNodeIndex
>
()
{
if
(
nDiff
)
pNd
=
rIdx
.
GetNodes
()[
rIdx
.
GetIndex
()
+
nDiff
];
else
pNd
=
rIdx
.
pNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
SwNodeIndex
(
const
SwNode
&
rNd
,
long
nDiff
=
0
)
{
if
(
nDiff
)
pNd
=
rNd
.
GetNodes
()[
rNd
.
GetIndex
()
+
nDiff
];
else
pNd
=
(
SwNode
*
)
&
rNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
~
SwNodeIndex
()
{
Remove
();
}
inline
sal_uLong
operator
++
();
...
...
@@ -114,14 +136,18 @@ public:
SwNodeIndex
aStart
;
SwNodeIndex
aEnd
;
SwNodeRange
(
const
SwNodeIndex
&
rS
,
const
SwNodeIndex
&
rE
);
SwNodeRange
(
const
SwNodeRange
&
rRange
);
SwNodeRange
(
const
SwNodeIndex
&
rS
,
const
SwNodeIndex
&
rE
)
:
aStart
(
rS
),
aEnd
(
rE
)
{};
SwNodeRange
(
const
SwNodeRange
&
rRange
)
:
aStart
(
rRange
.
aStart
),
aEnd
(
rRange
.
aEnd
)
{};
SwNodeRange
(
SwNodes
&
rNds
,
sal_uLong
nSttIdx
=
0
,
sal_uLong
nEndIdx
=
0
)
:
aStart
(
rNds
,
nSttIdx
),
aEnd
(
rNds
,
nEndIdx
)
{};
SwNodeRange
(
SwNodes
&
rArr
,
sal_uLong
nSttIdx
=
0
,
sal_uLong
nEndIdx
=
0
);
SwNodeRange
(
const
SwNodeIndex
&
rS
,
long
nSttDiff
,
const
SwNodeIndex
&
rE
,
long
nEndDiff
=
0
);
SwNodeRange
(
const
SwNode
&
rS
,
long
nSttDiff
,
const
SwNode
&
rE
,
long
nEndDiff
=
0
);
SwNodeRange
(
const
SwNodeIndex
&
rS
,
long
nSttDiff
,
const
SwNodeIndex
&
rE
,
long
nEndDiff
=
0
)
:
aStart
(
rS
,
nSttDiff
),
aEnd
(
rE
,
nEndDiff
)
{};
SwNodeRange
(
const
SwNode
&
rS
,
long
nSttDiff
,
const
SwNode
&
rE
,
long
nEndDiff
=
0
)
:
aStart
(
rS
,
nSttDiff
),
aEnd
(
rE
,
nEndDiff
)
{};
};
// For inlines node.hxx is needed which in turn needs this one.
...
...
sw/source/core/docnode/ndindex.cxx
Dosyayı görüntüle @
d5d46849
...
...
@@ -19,60 +19,6 @@
#include "ndindex.hxx"
SwNodeRange
::
SwNodeRange
(
const
SwNodeIndex
&
rS
,
const
SwNodeIndex
&
rE
)
:
aStart
(
rS
),
aEnd
(
rE
)
{}
SwNodeRange
::
SwNodeRange
(
const
SwNodeRange
&
rRange
)
:
aStart
(
rRange
.
aStart
),
aEnd
(
rRange
.
aEnd
)
{}
SwNodeRange
::
SwNodeRange
(
SwNodes
&
rNds
,
sal_uLong
nSttIdx
,
sal_uLong
nEndIdx
)
:
aStart
(
rNds
,
nSttIdx
),
aEnd
(
rNds
,
nEndIdx
)
{}
SwNodeRange
::
SwNodeRange
(
const
SwNodeIndex
&
rS
,
long
nSttDiff
,
const
SwNodeIndex
&
rE
,
long
nEndDiff
)
:
aStart
(
rS
,
nSttDiff
),
aEnd
(
rE
,
nEndDiff
)
{}
SwNodeRange
::
SwNodeRange
(
const
SwNode
&
rS
,
long
nSttDiff
,
const
SwNode
&
rE
,
long
nEndDiff
)
:
aStart
(
rS
,
nSttDiff
),
aEnd
(
rE
,
nEndDiff
)
{}
SwNodeIndex
::
SwNodeIndex
(
SwNodes
&
rNds
,
sal_uLong
nIdx
)
:
pNd
(
rNds
[
nIdx
]
)
{
RegisterIndex
(
rNds
);
}
SwNodeIndex
::
SwNodeIndex
(
const
SwNodeIndex
&
rIdx
,
long
nDiff
)
:
sw
::
Ring
<
SwNodeIndex
>
()
{
if
(
nDiff
)
pNd
=
rIdx
.
GetNodes
()[
rIdx
.
GetIndex
()
+
nDiff
];
else
pNd
=
rIdx
.
pNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
SwNodeIndex
::
SwNodeIndex
(
const
SwNode
&
rNd
,
long
nDiff
)
{
if
(
nDiff
)
pNd
=
rNd
.
GetNodes
()[
rNd
.
GetIndex
()
+
nDiff
];
else
pNd
=
(
SwNode
*
)
&
rNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
void
SwNodeIndex
::
Remove
()
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
}
SwNodeIndex
&
SwNodeIndex
::
operator
=
(
const
SwNodeIndex
&
rIdx
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rIdx
.
pNd
->
GetNodes
()
)
...
...
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