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
4420650b
Kaydet (Commit)
4420650b
authored
Kas 25, 2013
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xub_StrLen/unsigned to sal_Int32
Change-Id: I6d89f19ef2ee3aa83f3e74a416c41cd42dd448fa
üst
8a4c4520
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
expfld.hxx
sw/inc/expfld.hxx
+1
-1
expfld.cxx
sw/source/core/fields/expfld.cxx
+2
-2
reffld.cxx
sw/source/core/fields/reffld.cxx
+9
-9
No files found.
sw/inc/expfld.hxx
Dosyayı görüntüle @
4420650b
...
@@ -124,7 +124,7 @@ public:
...
@@ -124,7 +124,7 @@ public:
virtual
bool
QueryValue
(
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt16
nWhich
)
const
;
virtual
bool
QueryValue
(
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt16
nWhich
)
const
;
virtual
bool
PutValue
(
const
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt16
nWhich
);
virtual
bool
PutValue
(
const
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt16
nWhich
);
static
xub_StrLen
GetReferenceTextPos
(
const
SwFmtFld
&
rFmt
,
SwDoc
&
rDoc
,
unsigned
nHint
=
0
);
static
sal_Int32
GetReferenceTextPos
(
const
SwFmtFld
&
rFmt
,
SwDoc
&
rDoc
,
sal_Int32
nHint
=
0
);
// #i82544#
// #i82544#
void
SetLateInitialization
()
{
bLateInitialization
=
true
;}
void
SetLateInitialization
()
{
bLateInitialization
=
true
;}
};
};
...
...
sw/source/core/fields/expfld.cxx
Dosyayı görüntüle @
4420650b
...
@@ -866,13 +866,13 @@ void SwGetExpField::SetValue( const double& rAny )
...
@@ -866,13 +866,13 @@ void SwGetExpField::SetValue( const double& rAny )
* @param nHint search starting position after the current field (or 0 if default)
* @param nHint search starting position after the current field (or 0 if default)
* @return
* @return
*/
*/
xub_StrLen
SwGetExpField
::
GetReferenceTextPos
(
const
SwFmtFld
&
rFmt
,
SwDoc
&
rDoc
,
unsigned
nHint
)
sal_Int32
SwGetExpField
::
GetReferenceTextPos
(
const
SwFmtFld
&
rFmt
,
SwDoc
&
rDoc
,
sal_Int32
nHint
)
{
{
//
//
const
SwTxtFld
*
pTxtFld
=
rFmt
.
GetTxtFld
();
const
SwTxtFld
*
pTxtFld
=
rFmt
.
GetTxtFld
();
const
SwTxtNode
&
rTxtNode
=
pTxtFld
->
GetTxtNode
();
const
SwTxtNode
&
rTxtNode
=
pTxtFld
->
GetTxtNode
();
//
//
xub_StrLen
nRet
=
nHint
?
nHint
:
*
pTxtFld
->
GetStart
()
+
1
;
sal_Int32
nRet
=
nHint
?
nHint
:
*
pTxtFld
->
GetStart
()
+
1
;
OUString
sNodeText
=
rTxtNode
.
GetTxt
();
OUString
sNodeText
=
rTxtNode
.
GetTxt
();
if
(
nRet
<
sNodeText
.
getLength
())
if
(
nRet
<
sNodeText
.
getLength
())
...
...
sw/source/core/fields/reffld.cxx
Dosyayı görüntüle @
4420650b
...
@@ -285,14 +285,13 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
...
@@ -285,14 +285,13 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
return
;
return
;
}
}
// where is the category name (e.g. "Illustration")?
// where is the category name (e.g. "Illustration")?
OUString
const
Text
=
pTxtNd
->
GetTxt
();
OUString
const
sText
=
pTxtNd
->
GetTxt
();
unsigned
const
nCatStart
=
Text
.
indexOf
(
sSetRefName
);
const
sal_Int32
nCatStart
=
sText
.
indexOf
(
sSetRefName
);
unsigned
const
nCatEnd
=
nCatStart
==
unsigned
(
-
1
)
?
const
bool
bHasCat
=
nCatStart
>=
0
;
unsigned
(
-
1
)
:
nCatStart
+
sSetRefName
.
getLength
();
const
sal_Int32
nCatEnd
=
bHasCat
?
nCatStart
+
sSetRefName
.
getLength
()
:
-
1
;
bool
const
bHasCat
=
nCatStart
!=
unsigned
(
-
1
);
// length of the referenced text
// length of the referenced text
unsigned
const
nLen
=
Text
.
getLength
();
const
sal_Int32
nLen
=
s
Text
.
getLength
();
// which format?
// which format?
switch
(
GetFormat
()
)
switch
(
GetFormat
()
)
...
@@ -303,7 +302,8 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
...
@@ -303,7 +302,8 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case
REF_ONLYSEQNO
:
case
REF_ONLYSEQNO
:
{
{
// needed part of Text
// needed part of Text
unsigned
nStart
,
nEnd
;
sal_Int32
nStart
;
sal_Int32
nEnd
;
switch
(
nSubType
)
switch
(
nSubType
)
{
{
...
@@ -329,7 +329,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
...
@@ -329,7 +329,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
pTxtNd
->
GetTxtAttrForCharAt
(
nNumStart
,
RES_TXTATR_FIELD
)
pTxtNd
->
GetTxtAttrForCharAt
(
nNumStart
,
RES_TXTATR_FIELD
)
)
{
)
{
// start searching from nFrom
// start searching from nFrom
unsigned
const
nFrom
=
bHasCat
?
const
sal_Int32
nFrom
=
bHasCat
?
std
::
max
<
unsigned
>
(
nNumStart
+
1
,
nCatEnd
)
:
nNumStart
+
1
;
std
::
max
<
unsigned
>
(
nNumStart
+
1
,
nCatEnd
)
:
nNumStart
+
1
;
nStart
=
SwGetExpField
::
GetReferenceTextPos
(
nStart
=
SwGetExpField
::
GetReferenceTextPos
(
pTxtAttr
->
GetFmtFld
(),
*
pDoc
,
nFrom
pTxtAttr
->
GetFmtFld
(),
*
pDoc
,
nFrom
...
@@ -345,7 +345,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
...
@@ -345,7 +345,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
// "Numbering"
// "Numbering"
case
REF_ONLYSEQNO
:
case
REF_ONLYSEQNO
:
nStart
=
nNumStart
;
nStart
=
nNumStart
;
nEnd
=
std
::
min
<
unsigned
>
(
nStart
+
1
,
nLen
);
nEnd
=
std
::
min
(
nStart
+
1
,
nLen
);
break
;
break
;
// "Reference" (whole Text)
// "Reference" (whole Text)
...
...
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