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
f3974d02
Kaydet (Commit)
f3974d02
authored
Tem 24, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simplify ChkPaM some more
Change-Id: I499f76252d145fc3a3afd2e3646ef81e8055e327
üst
bb67dc27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
36 deletions
+10
-36
docbm.cxx
sw/source/core/doc/docbm.cxx
+10
-36
No files found.
sw/source/core/doc/docbm.cxx
Dosyayı görüntüle @
f3974d02
...
...
@@ -1475,36 +1475,7 @@ namespace
inline
void
SetRightMarkPos
(
MarkBase
*
pMark
,
bool
bOther
,
const
SwPosition
*
const
pPos
)
{
bOther
?
pMark
->
SetOtherMarkPos
(
*
pPos
)
:
pMark
->
SetMarkPos
(
*
pPos
);
};
};
static
void
lcl_ChkUnoCrsrPaM
(
std
::
vector
<
PaMEntry
>&
rMarkEntries
,
sal_uLong
nNode
,
sal_Int32
nCntnt
,
const
SwPaM
&
rPam
,
bool
bChkSelDirection
)
{
// Respect direction of selection
bool
bBound1IsStart
=
!
bChkSelDirection
||
(
*
rPam
.
GetPoint
()
<
*
rPam
.
GetMark
()
?
rPam
.
GetPoint
()
==
&
rPam
.
GetBound
()
:
rPam
.
GetMark
()
==
&
rPam
.
GetBound
());
const
SwPosition
*
pPos
=
&
rPam
.
GetBound
(
true
);
if
(
pPos
->
nNode
.
GetIndex
()
==
nNode
&&
(
bBound1IsStart
?
pPos
->
nContent
.
GetIndex
()
<
nCntnt
:
pPos
->
nContent
.
GetIndex
()
<=
nCntnt
))
{
const
PaMEntry
aEntry
=
{
const_cast
<
SwPaM
*>
(
&
rPam
),
false
,
pPos
->
nContent
.
GetIndex
()
};
rMarkEntries
.
push_back
(
aEntry
);
}
pPos
=
&
rPam
.
GetBound
(
false
);
if
(
pPos
->
nNode
.
GetIndex
()
==
nNode
&&
(
(
bBound1IsStart
&&
bChkSelDirection
)
?
pPos
->
nContent
.
GetIndex
()
<=
nCntnt
:
pPos
->
nContent
.
GetIndex
()
<
nCntnt
))
{
const
PaMEntry
aEntry
=
{
const_cast
<
SwPaM
*>
(
&
rPam
),
true
,
pPos
->
nContent
.
GetIndex
()
};
rMarkEntries
.
push_back
(
aEntry
);
}
}
static
void
lcl_ChkPaM
(
std
::
vector
<
PaMEntry
>
&
rPaMEntries
,
sal_uLong
nNode
,
sal_Int32
nCntnt
,
SwPaM
&
rPaM
,
const
bool
bPoint
)
static
inline
void
lcl_ChkPaM
(
std
::
vector
<
PaMEntry
>&
rPaMEntries
,
const
sal_uLong
nNode
,
const
sal_Int32
nCntnt
,
SwPaM
&
rPaM
,
const
bool
bPoint
)
{
const
SwPosition
*
pPos
=
&
rPaM
.
GetBound
(
bPoint
);
if
(
pPos
->
nNode
.
GetIndex
()
==
nNode
&&
pPos
->
nContent
.
GetIndex
()
<
nCntnt
)
...
...
@@ -1513,6 +1484,11 @@ namespace
rPaMEntries
.
push_back
(
aEntry
);
}
}
static
inline
void
lcl_ChkPaMBoth
(
std
::
vector
<
PaMEntry
>&
rPaMEntries
,
const
sal_uLong
nNode
,
const
sal_Int32
nCntnt
,
SwPaM
&
rPaM
)
{
lcl_ChkPaM
(
rPaMEntries
,
nNode
,
nCntnt
,
rPaM
,
true
);
lcl_ChkPaM
(
rPaMEntries
,
nNode
,
nCntnt
,
rPaM
,
false
);
}
#if 0
static void DumpEntries(std::vector<MarkEntry>* pEntries)
...
...
@@ -1693,13 +1669,13 @@ void CntntIdxStoreImpl::SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCn
BOOST_FOREACH
(
const
SwUnoCrsr
*
pUnoCrsr
,
pDoc
->
GetUnoCrsrTbl
())
{
FOREACHPAM_START
(
const_cast
<
SwUnoCrsr
*>
(
pUnoCrsr
)
)
lcl_Chk
UnoCrsrPaM
(
m_aUnoCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
,
false
);
lcl_Chk
PaMBoth
(
m_aUnoCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
);
FOREACHPAM_END
()
const
SwUnoTableCrsr
*
pUnoTblCrsr
=
dynamic_cast
<
const
SwUnoTableCrsr
*>
(
pUnoCrsr
);
if
(
pUnoTblCrsr
)
{
FOREACHPAM_START
(
&
(
const_cast
<
SwUnoTableCrsr
*>
(
pUnoTblCrsr
))
->
GetSelRing
()
)
lcl_Chk
UnoCrsrPaM
(
m_aUnoCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
,
false
);
lcl_Chk
PaMBoth
(
m_aUnoCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
);
FOREACHPAM_END
()
}
}
...
...
@@ -1725,14 +1701,12 @@ void CntntIdxStoreImpl::SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 n
SwPaM
*
_pStkCrsr
=
((
SwCrsrShell
*
)
_pStartShell
)
->
GetStkCrsr
();
if
(
_pStkCrsr
)
do
{
lcl_ChkPaM
(
m_aShellCrsrEntries
,
nNode
,
nCntnt
,
*
_pStkCrsr
,
true
);
lcl_ChkPaM
(
m_aShellCrsrEntries
,
nNode
,
nCntnt
,
*
_pStkCrsr
,
false
);
lcl_ChkPaMBoth
(
m_aShellCrsrEntries
,
nNode
,
nCntnt
,
*
_pStkCrsr
);
}
while
(
(
_pStkCrsr
!=
0
)
&&
((
_pStkCrsr
=
(
SwPaM
*
)
_pStkCrsr
->
GetNext
())
!=
((
SwCrsrShell
*
)
_pStartShell
)
->
GetStkCrsr
())
);
FOREACHPAM_START
(
((
SwCrsrShell
*
)
_pStartShell
)
->
_GetCrsr
()
)
lcl_ChkPaM
(
m_aShellCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
,
true
);
lcl_ChkPaM
(
m_aShellCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
,
false
);
lcl_ChkPaMBoth
(
m_aShellCrsrEntries
,
nNode
,
nCntnt
,
*
PCURCRSR
);
FOREACHPAM_END
()
}
}
while
((
_pStartShell
=
(
SwViewShell
*
)
_pStartShell
->
GetNext
())
!=
pShell
);
...
...
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