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
3e7004c3
Kaydet (Commit)
3e7004c3
authored
Tem 23, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_uInt16 to size_t/bool in SwInputFieldList
Change-Id: Ib54e747abaf4e7a911dd3986d27f21a96eaa6120
üst
4f2b97d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
expfld.hxx
sw/inc/expfld.hxx
+5
-5
fldlst.cxx
sw/source/core/fields/fldlst.cxx
+12
-12
wrtsh2.cxx
sw/source/uibase/wrtsh/wrtsh2.cxx
+2
-2
No files found.
sw/inc/expfld.hxx
Dosyayı görüntüle @
3e7004c3
...
...
@@ -357,17 +357,17 @@ public:
SwInputFieldList
(
SwEditShell
*
pShell
,
bool
bBuildTmpLst
=
false
);
~
SwInputFieldList
();
s
al_uInt16
Count
()
const
;
SwField
*
GetField
(
s
al_uInt16
nId
);
s
ize_t
Count
()
const
;
SwField
*
GetField
(
s
ize_t
nId
);
void
GotoFieldPos
(
s
al_uInt16
nId
);
void
GotoFieldPos
(
s
ize_t
nId
);
void
PushCrsr
();
void
PopCrsr
();
/** Put all that are new into SortLst for updating. @return
count
.
/** Put all that are new into SortLst for updating. @return
true if not empty
.
(For Glossary: only update its input-fields).
Compare TmpLst with current fields. */
sal_uInt16
BuildSortLst
();
bool
BuildSortLst
();
private
:
SwEditShell
*
pSh
;
...
...
sw/source/core/fields/fldlst.cxx
Dosyayı görüntüle @
3e7004c3
...
...
@@ -38,13 +38,13 @@ SwInputFieldList::SwInputFieldList( SwEditShell* pShell, bool bBuildTmpLst )
pSrtLst
=
new
_SetGetExpFlds
();
const
SwFldTypes
&
rFldTypes
=
*
pSh
->
GetDoc
()
->
GetFldTypes
();
const
s
al_uInt16
nSize
=
rFldTypes
.
size
();
const
s
ize_t
nSize
=
rFldTypes
.
size
();
// iterate over all types
for
(
s
al_uInt16
i
=
0
;
i
<
nSize
;
++
i
)
for
(
s
ize_t
i
=
0
;
i
<
nSize
;
++
i
)
{
SwFieldType
*
pFldType
=
(
SwFieldType
*
)
rFldTypes
[
i
];
sal_uInt16
nType
=
pFldType
->
Which
();
const
sal_uInt16
nType
=
pFldType
->
Which
();
if
(
RES_SETEXPFLD
==
nType
||
RES_INPUTFLD
==
nType
||
RES_DROPDOWN
==
nType
)
{
...
...
@@ -82,13 +82,13 @@ SwInputFieldList::~SwInputFieldList()
delete
pSrtLst
;
}
s
al_uInt16
SwInputFieldList
::
Count
()
const
s
ize_t
SwInputFieldList
::
Count
()
const
{
return
pSrtLst
->
size
();
}
// get field from list in sorted order
SwField
*
SwInputFieldList
::
GetField
(
s
al_uInt16
nId
)
SwField
*
SwInputFieldList
::
GetField
(
s
ize_t
nId
)
{
const
SwTxtFld
*
pTxtFld
=
(
*
pSrtLst
)[
nId
]
->
GetTxtFld
();
OSL_ENSURE
(
pTxtFld
,
"no TextFld"
);
...
...
@@ -109,7 +109,7 @@ void SwInputFieldList::PopCrsr()
}
/// go to position of a field
void
SwInputFieldList
::
GotoFieldPos
(
s
al_uInt16
nId
)
void
SwInputFieldList
::
GotoFieldPos
(
s
ize_t
nId
)
{
pSh
->
StartAllAction
();
(
*
pSrtLst
)[
nId
]
->
GetPosOfContent
(
*
pSh
->
GetCrsr
()
->
GetPoint
()
);
...
...
@@ -121,18 +121,18 @@ void SwInputFieldList::GotoFieldPos(sal_uInt16 nId)
* All new ones are added to SortList so that they can be updated.
* For text blocks: update only input fields.
*
* @return
count
* @return
true if not empty
*/
sal_uInt16
SwInputFieldList
::
BuildSortLst
()
bool
SwInputFieldList
::
BuildSortLst
()
{
const
SwFldTypes
&
rFldTypes
=
*
pSh
->
GetDoc
()
->
GetFldTypes
();
sal_uInt16
nSize
=
rFldTypes
.
size
();
const
size_t
nSize
=
rFldTypes
.
size
();
// iterate over all types
for
(
s
al_uInt16
i
=
0
;
i
<
nSize
;
++
i
)
for
(
s
ize_t
i
=
0
;
i
<
nSize
;
++
i
)
{
SwFieldType
*
pFldType
=
(
SwFieldType
*
)
rFldTypes
[
i
];
sal_uInt16
nType
=
pFldType
->
Which
();
const
sal_uInt16
nType
=
pFldType
->
Which
();
if
(
RES_SETEXPFLD
==
nType
||
RES_INPUTFLD
==
nType
)
{
...
...
@@ -166,7 +166,7 @@ sal_uInt16 SwInputFieldList::BuildSortLst()
// the pointers are not needed anymore
aTmpLst
.
clear
();
return
pSrtLst
->
size
();
return
!
pSrtLst
->
empty
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/uibase/wrtsh/wrtsh2.cxx
Dosyayı görüntüle @
3e7004c3
...
...
@@ -137,14 +137,14 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst )
if
(
!
pTmp
)
pTmp
=
new
SwInputFieldList
(
this
);
const
s
al_uInt16
nCnt
=
pTmp
->
Count
();
const
s
ize_t
nCnt
=
pTmp
->
Count
();
if
(
nCnt
)
{
pTmp
->
PushCrsr
();
bool
bCancel
=
false
;
OString
aDlgPos
;
for
(
s
al_uInt16
i
=
0
;
i
<
nCnt
&&
!
bCancel
;
++
i
)
for
(
s
ize_t
i
=
0
;
i
<
nCnt
&&
!
bCancel
;
++
i
)
{
pTmp
->
GotoFieldPos
(
i
);
SwField
*
pField
=
pTmp
->
GetField
(
i
);
...
...
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