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
958492d4
Kaydet (Commit)
958492d4
authored
Haz 11, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simplify MarkPos conditional
Change-Id: If109980429f2f87e06065837eaec7129b2ece336
üst
5deaac4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
28 deletions
+12
-28
docbm.cxx
sw/source/core/doc/docbm.cxx
+12
-28
No files found.
sw/source/core/doc/docbm.cxx
Dosyayı görüntüle @
958492d4
...
...
@@ -2009,6 +2009,10 @@ namespace
inline
void
SaveBkmks
(
SwDoc
*
pDoc
,
sal_uLong
nNode
,
sal_Int32
nCntnt
);
inline
void
RestoreBkmks
(
SwDoc
*
pDoc
,
sal_uLong
nNode
,
sal_Int32
nOffset
);
inline
void
RestoreBkmksLen
(
SwNode
&
rNd
,
sal_uLong
nLen
,
sal_Int32
nCorrLen
);
inline
const
SwPosition
&
GetRightMarkPos
(
::
sw
::
mark
::
IMark
*
pMark
,
bool
bOther
)
{
return
bOther
?
pMark
->
GetOtherMarkPos
()
:
pMark
->
GetMarkPos
();
};
inline
void
SetRightMarkPos
(
MarkBase
*
pMark
,
bool
bOther
,
const
SwPosition
*
const
pPos
)
{
bOther
?
pMark
->
SetOtherMarkPos
(
*
pPos
)
:
pMark
->
SetMarkPos
(
*
pPos
);
};
};
}
...
...
@@ -2060,20 +2064,10 @@ void CntntIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nOf
{
if
(
MarkBase
*
pMark
=
dynamic_cast
<
MarkBase
*>
(
pMarkAccess
->
getAllMarksBegin
()[
pEntry
->
m_nBkmkIdx
].
get
()))
{
if
(
pEntry
->
m_bOther
)
{
SwPosition
aNewPos
(
pMark
->
GetOtherMarkPos
());
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
pEntry
->
m_nCntnt
+
nOffset
);
pMark
->
SetOtherMarkPos
(
aNewPos
);
}
else
{
SwPosition
aNewPos
(
pMark
->
GetMarkPos
());
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
pEntry
->
m_nCntnt
+
nOffset
);
pMark
->
SetMarkPos
(
aNewPos
);
}
SwPosition
aNewPos
(
GetRightMarkPos
(
pMark
,
pEntry
->
m_bOther
));
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
pEntry
->
m_nCntnt
+
nOffset
);
SetRightMarkPos
(
pMark
,
pEntry
->
m_bOther
,
&
aNewPos
);
}
}
}
...
...
@@ -2092,20 +2086,10 @@ void CntntIdxStoreImpl::RestoreBkmksLen(SwNode& rNd, sal_uLong nLen, sal_Int32 n
{
if
(
MarkBase
*
pMark
=
dynamic_cast
<
MarkBase
*>
(
pMarkAccess
->
getAllMarksBegin
()[
pEntry
->
m_nBkmkIdx
].
get
()))
{
if
(
pEntry
->
m_bOther
)
{
SwPosition
aNewPos
(
pMark
->
GetOtherMarkPos
());
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
::
std
::
min
(
pEntry
->
m_nCntnt
,
static_cast
<
sal_Int32
>
(
nLen
)));
pMark
->
SetOtherMarkPos
(
aNewPos
);
}
else
{
SwPosition
aNewPos
(
pMark
->
GetMarkPos
());
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
::
std
::
min
(
pEntry
->
m_nCntnt
,
static_cast
<
sal_Int32
>
(
nLen
)));
pMark
->
SetMarkPos
(
aNewPos
);
}
SwPosition
aNewPos
(
GetRightMarkPos
(
pMark
,
pEntry
->
m_bOther
));
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
::
std
::
min
(
pEntry
->
m_nCntnt
,
static_cast
<
sal_Int32
>
(
nLen
)));
SetRightMarkPos
(
pMark
,
pEntry
->
m_bOther
,
&
aNewPos
);
}
}
}
...
...
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