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
96c7fff3
Kaydet (Commit)
96c7fff3
authored
Ara 20, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
inline Assign
Change-Id: Ibeb8d7b8e83d432a502707f83a8fde7900596aec
üst
eaf37747
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
57 deletions
+32
-57
ndindex.hxx
sw/inc/ndindex.hxx
+32
-2
ndindex.cxx
sw/source/core/docnode/ndindex.cxx
+0
-55
No files found.
sw/inc/ndindex.hxx
Dosyayı görüntüle @
96c7fff3
...
@@ -114,8 +114,8 @@ public:
...
@@ -114,8 +114,8 @@ public:
inline
sal_uLong
GetIndex
()
const
;
inline
sal_uLong
GetIndex
()
const
;
// Enables assignments without creation of a temporary object.
// Enables assignments without creation of a temporary object.
SwNodeIndex
&
Assign
(
SwNodes
&
rNds
,
sal_uLong
);
inline
SwNodeIndex
&
Assign
(
SwNodes
&
rNds
,
sal_uLong
);
SwNodeIndex
&
Assign
(
const
SwNode
&
rNd
,
long
nOffset
=
0
);
inline
SwNodeIndex
&
Assign
(
const
SwNode
&
rNd
,
long
nOffset
=
0
);
// Gets pointer on NodesArray.
// Gets pointer on NodesArray.
inline
const
SwNodes
&
GetNodes
()
const
;
inline
const
SwNodes
&
GetNodes
()
const
;
...
@@ -282,6 +282,36 @@ SwNodeIndex& SwNodeIndex::operator=( const SwNode& rNd )
...
@@ -282,6 +282,36 @@ SwNodeIndex& SwNodeIndex::operator=( const SwNode& rNd )
return
*
this
;
return
*
this
;
}
}
SwNodeIndex
&
SwNodeIndex
::
Assign
(
SwNodes
&
rNds
,
sal_uLong
nIdx
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rNds
)
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
pNd
=
rNds
[
nIdx
];
RegisterIndex
(
pNd
->
GetNodes
()
);
}
else
pNd
=
rNds
[
nIdx
];
return
*
this
;
}
SwNodeIndex
&
SwNodeIndex
::
Assign
(
const
SwNode
&
rNd
,
long
nOffset
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rNd
.
GetNodes
()
)
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
pNd
=
(
SwNode
*
)
&
rNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
else
pNd
=
(
SwNode
*
)
&
rNd
;
if
(
nOffset
)
pNd
=
pNd
->
GetNodes
()[
pNd
->
GetIndex
()
+
nOffset
];
return
*
this
;
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/docnode/ndindex.cxx
Dosyayı görüntüle @
96c7fff3
...
@@ -19,61 +19,6 @@
...
@@ -19,61 +19,6 @@
#include "ndindex.hxx"
#include "ndindex.hxx"
SwNodeIndex
&
SwNodeIndex
::
operator
=
(
const
SwNodeIndex
&
rIdx
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rIdx
.
pNd
->
GetNodes
()
)
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
pNd
=
rIdx
.
pNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
else
pNd
=
rIdx
.
pNd
;
return
*
this
;
}
SwNodeIndex
&
SwNodeIndex
::
operator
=
(
const
SwNode
&
rNd
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rNd
.
GetNodes
()
)
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
pNd
=
(
SwNode
*
)
&
rNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
else
pNd
=
(
SwNode
*
)
&
rNd
;
return
*
this
;
}
SwNodeIndex
&
SwNodeIndex
::
Assign
(
SwNodes
&
rNds
,
sal_uLong
nIdx
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rNds
)
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
pNd
=
rNds
[
nIdx
];
RegisterIndex
(
pNd
->
GetNodes
()
);
}
else
pNd
=
rNds
[
nIdx
];
return
*
this
;
}
SwNodeIndex
&
SwNodeIndex
::
Assign
(
const
SwNode
&
rNd
,
long
nOffset
)
{
if
(
&
pNd
->
GetNodes
()
!=
&
rNd
.
GetNodes
()
)
{
DeRegisterIndex
(
pNd
->
GetNodes
()
);
pNd
=
(
SwNode
*
)
&
rNd
;
RegisterIndex
(
pNd
->
GetNodes
()
);
}
else
pNd
=
(
SwNode
*
)
&
rNd
;
if
(
nOffset
)
pNd
=
pNd
->
GetNodes
()[
pNd
->
GetIndex
()
+
nOffset
];
return
*
this
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
SwNodeIndex
&
index
)
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
SwNodeIndex
&
index
)
{
{
...
...
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