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
7902e30a
Kaydet (Commit)
7902e30a
authored
Ara 01, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
move Ring to sw::Ring
Change-Id: I3109185f747b821ee94aae5c58f86768ca30713a
üst
6172730c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
33 deletions
+36
-33
pam.hxx
sw/inc/pam.hxx
+1
-1
ring.hxx
sw/inc/ring.hxx
+31
-28
viewsh.hxx
sw/inc/viewsh.hxx
+1
-1
uwriter.cxx
sw/qa/core/uwriter.cxx
+2
-2
doccomp.cxx
sw/source/core/doc/doccomp.cxx
+1
-1
No files found.
sw/inc/pam.hxx
Dosyayı görüntüle @
7902e30a
...
@@ -155,7 +155,7 @@ void _InitPam();
...
@@ -155,7 +155,7 @@ void _InitPam();
class
SwPaM
;
class
SwPaM
;
/// PaM is Point and Mark: a selection of the document model.
/// PaM is Point and Mark: a selection of the document model.
class
SW_DLLPUBLIC
SwPaM
:
public
Ring
<
SwPaM
>
class
SW_DLLPUBLIC
SwPaM
:
public
sw
::
Ring
<
SwPaM
>
{
{
SwPosition
m_Bound1
;
SwPosition
m_Bound1
;
SwPosition
m_Bound2
;
SwPosition
m_Bound2
;
...
...
sw/inc/ring.hxx
Dosyayı görüntüle @
7902e30a
...
@@ -24,12 +24,14 @@
...
@@ -24,12 +24,14 @@
#include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/intrusive/circular_list_algorithms.hpp>
#include <boost/intrusive/circular_list_algorithms.hpp>
class
Ring_node_traits
;
namespace
sw
template
<
class
T
>
class
RingIterator
;
template
<
class
T
>
class
SW_DLLPUBLIC
Ring
{
{
class
Ring_node_traits
;
template
<
class
T
>
class
RingIterator
;
template
<
class
T
>
class
SW_DLLPUBLIC
Ring
{
struct
Ring_node_traits
struct
Ring_node_traits
{
{
typedef
T
node
;
typedef
T
node
;
...
@@ -45,11 +47,11 @@ class SW_DLLPUBLIC Ring
...
@@ -45,11 +47,11 @@ class SW_DLLPUBLIC Ring
T
*
pNext
;
T
*
pNext
;
T
*
pPrev
;
///< In order to speed up inserting and deleting.
T
*
pPrev
;
///< In order to speed up inserting and deleting.
protected
:
protected
:
Ring
()
Ring
()
{
algo
::
init_header
(
static_cast
<
T
*
>
(
this
));
}
{
algo
::
init_header
(
static_cast
<
T
*
>
(
this
));
}
Ring
(
T
*
);
Ring
(
T
*
);
public
:
public
:
typedef
RingIterator
<
T
>
iterator
;
typedef
RingIterator
<
T
>
iterator
;
typedef
RingIterator
<
T
>
const_iterator
;
typedef
RingIterator
<
T
>
const_iterator
;
virtual
~
Ring
()
virtual
~
Ring
()
...
@@ -66,21 +68,21 @@ public:
...
@@ -66,21 +68,21 @@ public:
sal_uInt32
numberOf
()
const
sal_uInt32
numberOf
()
const
{
return
algo
::
count
(
static_cast
<
const
T
*
>
(
this
));
}
{
return
algo
::
count
(
static_cast
<
const
T
*
>
(
this
));
}
};
};
template
<
class
T
>
template
<
class
T
>
inline
Ring
<
T
>::
Ring
(
T
*
pObj
)
inline
Ring
<
T
>::
Ring
(
T
*
pObj
)
{
{
T
*
pThis
=
static_cast
<
T
*
>
(
this
);
T
*
pThis
=
static_cast
<
T
*
>
(
this
);
if
(
!
pObj
)
if
(
!
pObj
)
algo
::
init_header
(
pThis
);
algo
::
init_header
(
pThis
);
else
else
algo
::
link_before
(
pObj
,
pThis
);
algo
::
link_before
(
pObj
,
pThis
);
}
}
template
<
class
T
>
template
<
class
T
>
inline
void
Ring
<
T
>::
MoveTo
(
T
*
pDestRing
)
inline
void
Ring
<
T
>::
MoveTo
(
T
*
pDestRing
)
{
{
T
*
pThis
=
static_cast
<
T
*
>
(
this
);
T
*
pThis
=
static_cast
<
T
*
>
(
this
);
// insert into "new"
// insert into "new"
if
(
pDestRing
)
if
(
pDestRing
)
...
@@ -92,22 +94,22 @@ inline void Ring<T>::MoveTo(T* pDestRing)
...
@@ -92,22 +94,22 @@ inline void Ring<T>::MoveTo(T* pDestRing)
}
}
else
else
algo
::
unlink
(
pThis
);
algo
::
unlink
(
pThis
);
}
}
template
<
class
T
>
template
<
class
T
>
inline
void
Ring
<
T
>::
MoveRingTo
(
T
*
pDestRing
)
inline
void
Ring
<
T
>::
MoveRingTo
(
T
*
pDestRing
)
{
{
std
::
swap
(
*
(
&
pPrev
->
pNext
),
*
(
&
pDestRing
->
pPrev
->
pNext
));
std
::
swap
(
*
(
&
pPrev
->
pNext
),
*
(
&
pDestRing
->
pPrev
->
pNext
));
std
::
swap
(
*
(
&
pPrev
),
*
(
&
pDestRing
->
pPrev
));
std
::
swap
(
*
(
&
pPrev
),
*
(
&
pDestRing
->
pPrev
));
}
}
template
<
class
T
>
template
<
class
T
>
class
RingIterator
:
public
boost
::
iterator_facade
<
class
RingIterator
:
public
boost
::
iterator_facade
<
RingIterator
<
T
>
RingIterator
<
T
>
,
T
,
T
,
boost
::
forward_traversal_tag
,
boost
::
forward_traversal_tag
>
>
{
{
public
:
public
:
RingIterator
()
RingIterator
()
:
m_pCurrent
(
nullptr
)
:
m_pCurrent
(
nullptr
)
...
@@ -130,16 +132,17 @@ class RingIterator : public boost::iterator_facade<
...
@@ -130,16 +132,17 @@ class RingIterator : public boost::iterator_facade<
{
return
m_pCurrent
?
*
m_pCurrent
:
*
m_pStart
;
}
{
return
m_pCurrent
?
*
m_pCurrent
:
*
m_pStart
;
}
T
*
m_pCurrent
;
T
*
m_pCurrent
;
T
*
m_pStart
;
T
*
m_pStart
;
};
};
template
<
class
T
>
template
<
class
T
>
inline
typename
Ring
<
T
>::
iterator
Ring
<
T
>::
beginRing
()
inline
typename
Ring
<
T
>::
iterator
Ring
<
T
>::
beginRing
()
{
return
Ring
<
T
>::
iterator
(
static_cast
<
T
*
>
(
this
));
};
{
return
Ring
<
T
>::
iterator
(
static_cast
<
T
*
>
(
this
));
};
template
<
class
T
>
template
<
class
T
>
inline
typename
Ring
<
T
>::
iterator
Ring
<
T
>::
endRing
()
inline
typename
Ring
<
T
>::
iterator
Ring
<
T
>::
endRing
()
{
return
Ring
<
T
>::
iterator
(
static_cast
<
T
*
>
(
this
),
false
);
};
{
return
Ring
<
T
>::
iterator
(
static_cast
<
T
*
>
(
this
),
false
);
};
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/inc/viewsh.hxx
Dosyayı görüntüle @
7902e30a
...
@@ -95,7 +95,7 @@ enum FrameControlType
...
@@ -95,7 +95,7 @@ enum FrameControlType
typedef
boost
::
shared_ptr
<
SwRootFrm
>
SwRootFrmPtr
;
typedef
boost
::
shared_ptr
<
SwRootFrm
>
SwRootFrmPtr
;
class
SwViewShell
;
class
SwViewShell
;
class
SW_DLLPUBLIC
SwViewShell
:
public
Ring
<
SwViewShell
>
class
SW_DLLPUBLIC
SwViewShell
:
public
sw
::
Ring
<
SwViewShell
>
{
{
friend
void
SetOutDev
(
SwViewShell
*
pSh
,
OutputDevice
*
pOut
);
friend
void
SetOutDev
(
SwViewShell
*
pSh
,
OutputDevice
*
pOut
);
friend
void
SetOutDevAndWin
(
SwViewShell
*
pSh
,
OutputDevice
*
pOut
,
friend
void
SetOutDevAndWin
(
SwViewShell
*
pSh
,
OutputDevice
*
pOut
,
...
...
sw/qa/core/uwriter.cxx
Dosyayı görüntüle @
7902e30a
...
@@ -1275,9 +1275,9 @@ void SwDocTest::testMarkMove()
...
@@ -1275,9 +1275,9 @@ void SwDocTest::testMarkMove()
namespace
namespace
{
{
struct
TestRing
:
public
Ring
<
TestRing
>
struct
TestRing
:
public
sw
::
Ring
<
TestRing
>
{
{
TestRing
()
:
Ring
<
TestRing
>
()
{};
TestRing
()
:
sw
::
Ring
<
TestRing
>
()
{};
void
debug
()
void
debug
()
{
{
SAL_DEBUG
(
"TestRing at: "
<<
this
<<
" prev: "
<<
GetPrev
()
<<
" next: "
<<
GetNext
());
SAL_DEBUG
(
"TestRing at: "
<<
this
<<
" prev: "
<<
GetPrev
()
<<
" next: "
<<
GetNext
());
...
...
sw/source/core/doc/doccomp.cxx
Dosyayı görüntüle @
7902e30a
...
@@ -1828,7 +1828,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
...
@@ -1828,7 +1828,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
}
}
class
_SaveMergeRedlines
;
class
_SaveMergeRedlines
;
class
_SaveMergeRedlines
:
public
Ring
<
_SaveMergeRedlines
>
class
_SaveMergeRedlines
:
public
sw
::
Ring
<
_SaveMergeRedlines
>
{
{
const
SwRangeRedline
*
pSrcRedl
;
const
SwRangeRedline
*
pSrcRedl
;
SwRangeRedline
*
pDestRedl
;
SwRangeRedline
*
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