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
fb171e38
Kaydet (Commit)
fb171e38
authored
Haz 11, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add second Restore function for CntntIdxStore
Change-Id: I2d4c92d0927bce13b03a6f235e14812ed1d0bd54
üst
64c31cc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
docbm.cxx
sw/source/core/doc/docbm.cxx
+38
-0
No files found.
sw/source/core/doc/docbm.cxx
Dosyayı görüntüle @
fb171e38
...
...
@@ -2083,12 +2083,14 @@ namespace
}
virtual
void
Restore
(
SwNode
&
rNd
,
sal_Int32
nLen
,
sal_Int32
nCorrLen
)
SAL_OVERRIDE
{
RestoreBkmksLen
(
rNd
,
nLen
,
nCorrLen
);
return
_RestoreCntntIdx
(
m_aSaveArr
,
rNd
,
nLen
,
nCorrLen
);
}
virtual
~
CntntIdxStoreImpl
(){};
private
:
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
);
};
}
...
...
@@ -2161,6 +2163,42 @@ void CntntIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nOf
}
}
void
CntntIdxStoreImpl
::
RestoreBkmksLen
(
SwNode
&
rNd
,
sal_uLong
nLen
,
sal_Int32
nCorrLen
)
{
const
SwDoc
*
pDoc
=
rNd
.
GetDoc
();
IDocumentMarkAccess
*
const
pMarkAccess
=
const_cast
<
IDocumentMarkAccess
*>
(
pDoc
->
getIDocumentMarkAccess
());
SwCntntNode
*
pCNd
=
(
SwCntntNode
*
)
rNd
.
GetCntntNode
();
for
(
std
::
vector
<
BkmkEntry
>::
const_iterator
pEntry
=
m_aBkmkEntries
.
begin
();
pEntry
!=
m_aBkmkEntries
.
end
();
++
pEntry
)
{
if
(
!
pEntry
->
m_nCntnt
>=
nCorrLen
)
{
if
(
pEntry
->
m_bOther
)
{
if
(
MarkBase
*
pMark
=
dynamic_cast
<
MarkBase
*>
(
pMarkAccess
->
getAllMarksBegin
()[
pEntry
->
m_nBkmkIdx
].
get
()))
{
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
{
if
(
MarkBase
*
pMark
=
dynamic_cast
<
MarkBase
*>
(
pMarkAccess
->
getAllMarksBegin
()[
pEntry
->
m_nBkmkIdx
].
get
()))
{
SwPosition
aNewPos
(
pMark
->
GetMarkPos
());
aNewPos
.
nNode
=
*
pCNd
;
aNewPos
.
nContent
.
Assign
(
pCNd
,
::
std
::
min
(
pEntry
->
m_nCntnt
,
static_cast
<
sal_Int32
>
(
nLen
)));
pMark
->
SetMarkPos
(
aNewPos
);
}
}
}
}
}
namespace
sw
{
namespace
mark
{
boost
::
shared_ptr
<
CntntIdxStore
>
CntntIdxStore
::
Create
()
{
...
...
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