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
31ae7d51
Kaydet (Commit)
31ae7d51
authored
Şub 02, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_Bool to bool
Change-Id: Ia0a2183a3175ce1285c8d46a03a69702cbb8685c
üst
ed68c388
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
21 deletions
+21
-21
guess.cxx
sw/source/core/text/guess.cxx
+11
-11
guess.hxx
sw/source/core/text/guess.hxx
+1
-1
portxt.cxx
sw/source/core/text/portxt.cxx
+8
-8
portxt.hxx
sw/source/core/text/portxt.hxx
+1
-1
No files found.
sw/source/core/text/guess.cxx
Dosyayı görüntüle @
31ae7d51
...
...
@@ -50,14 +50,14 @@ using namespace ::com::sun::star::linguistic2;
* otherwise possible break or hyphenation position is determined
*************************************************************************/
sal_B
ool
SwTxtGuess
::
Guess
(
const
SwTxtPortion
&
rPor
,
SwTxtFormatInfo
&
rInf
,
b
ool
SwTxtGuess
::
Guess
(
const
SwTxtPortion
&
rPor
,
SwTxtFormatInfo
&
rInf
,
const
KSHORT
nPorHeight
)
{
nCutPos
=
rInf
.
GetIdx
();
// Empty strings are always 0
if
(
!
rInf
.
GetLen
()
||
rInf
.
GetTxt
().
isEmpty
()
)
return
sal_F
alse
;
return
f
alse
;
OSL_ENSURE
(
rInf
.
GetIdx
()
<
rInf
.
GetTxt
().
getLength
(),
"+SwTxtGuess::Guess: invalid SwTxtFormatInfo"
);
...
...
@@ -84,7 +84,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nMaxLen
=
rInf
.
GetLen
();
if
(
!
nMaxLen
)
return
sal_F
alse
;
return
f
alse
;
KSHORT
nItalic
=
0
;
if
(
ITALIC_NONE
!=
rInf
.
GetFont
()
->
GetItalic
()
&&
!
rInf
.
NotEOL
()
)
...
...
@@ -145,7 +145,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakWidth
+=
nLeftRightBorderSpace
;
return
sal_T
rue
;
return
t
rue
;
}
}
...
...
@@ -184,7 +184,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
rInf
.
GetTxtSize
(
&
rSI
,
rInf
.
GetIdx
(),
nMaxLen
,
nMaxComp
,
nBreakWidth
,
nMaxSizeDiff
);
// The following comparison should always give
sal_T
rue, otherwise
// The following comparison should always give
t
rue, otherwise
// there likely has been a pixel rounding error in GetTxtBreak
if
(
nBreakWidth
<=
nLineWidth
)
{
...
...
@@ -197,7 +197,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakWidth
+=
nLeftRightBorderSpace
;
return
sal_T
rue
;
return
t
rue
;
}
}
...
...
@@ -207,7 +207,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
{
nBreakPos
=
rInf
.
GetIdx
();
nCutPos
=
rInf
.
GetLen
();
return
sal_F
alse
;
return
f
alse
;
}
sal_Int32
nPorLen
=
0
;
...
...
@@ -347,12 +347,12 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
const
ForbiddenCharacters
aForbidden
(
*
rInf
.
GetTxtFrm
()
->
GetNode
()
->
getIDocumentSettingAccess
()
->
getForbiddenCharacters
(
aLang
,
true
)
);
const
sal_B
ool
bAllowHanging
=
rInf
.
IsHanging
()
&&
!
rInf
.
IsMulti
()
&&
const
b
ool
bAllowHanging
=
rInf
.
IsHanging
()
&&
!
rInf
.
IsMulti
()
&&
!
rPor
.
InFldGrp
();
LineBreakUserOptions
aUserOpt
(
aForbidden
.
beginLine
,
aForbidden
.
endLine
,
rInf
.
HasForbiddenChars
(),
bAllowHanging
,
sal_F
alse
);
rInf
.
HasForbiddenChars
(),
bAllowHanging
,
f
alse
);
//! register listener to LinguServiceEvents now in order to get
//! notified about relevant changes in the future
...
...
@@ -523,7 +523,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if
(
pHanging
)
nBreakPos
=
nCutPos
;
return
sal_F
alse
;
return
f
alse
;
}
/*************************************************************************
...
...
@@ -540,7 +540,7 @@ bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
Boundary
aBound
=
g_pBreakIt
->
GetBreakIter
()
->
getWordBoundary
(
rInf
.
GetTxt
(),
nPos
,
g_pBreakIt
->
GetLocale
(
rInf
.
GetFont
()
->
GetLanguage
()
),
WordType
::
DICTIONARY_WORD
,
sal_T
rue
);
WordType
::
DICTIONARY_WORD
,
t
rue
);
nBreakStart
=
aBound
.
startPos
;
sal_Int32
nWordLen
=
aBound
.
endPos
-
nBreakStart
;
...
...
sw/source/core/text/guess.hxx
Dosyayı görüntüle @
31ae7d51
...
...
@@ -47,7 +47,7 @@ public:
~
SwTxtGuess
()
{
delete
pHanging
;
}
// true, if current portion still fits to current line
sal_B
ool
Guess
(
const
SwTxtPortion
&
rPor
,
SwTxtFormatInfo
&
rInf
,
b
ool
Guess
(
const
SwTxtPortion
&
rPor
,
SwTxtFormatInfo
&
rInf
,
const
KSHORT
nHeight
);
bool
AlternativeSpelling
(
const
SwTxtFormatInfo
&
rInf
,
const
sal_Int32
nPos
);
...
...
sw/source/core/text/portxt.cxx
Dosyayı görüntüle @
31ae7d51
...
...
@@ -295,16 +295,16 @@ static bool lcl_HasContent( const SwFldPortion& rFld, SwTxtFormatInfo &rInf )
return
rFld
.
GetExpTxt
(
rInf
,
aTxt
)
&&
!
aTxt
.
isEmpty
();
}
sal_B
ool
SwTxtPortion
::
_Format
(
SwTxtFormatInfo
&
rInf
)
b
ool
SwTxtPortion
::
_Format
(
SwTxtFormatInfo
&
rInf
)
{
// 5744: If only the hypen does not fit anymore, we still need to wrap
// the word, or else return
sal_T
rue!
// the word, or else return
t
rue!
if
(
rInf
.
IsUnderFlow
()
&&
rInf
.
GetSoftHyphPos
()
)
{
// soft hyphen portion has triggered an underflow event because
// of an alternative spelling position
sal_Bool
bFull
=
sal_F
alse
;
const
sal_Bool
bHyph
=
rInf
.
ChgHyph
(
sal_T
rue
);
bool
bFull
=
f
alse
;
const
bool
bHyph
=
rInf
.
ChgHyph
(
t
rue
);
if
(
rInf
.
IsHyphenate
()
)
{
SwTxtGuess
aGuess
;
...
...
@@ -320,7 +320,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
}
SwTxtGuess
aGuess
;
const
sal_B
ool
bFull
=
!
aGuess
.
Guess
(
*
this
,
rInf
,
Height
()
);
const
b
ool
bFull
=
!
aGuess
.
Guess
(
*
this
,
rInf
,
Height
()
);
// these are the possible cases:
// A Portion fits to current line
...
...
@@ -372,9 +372,9 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
{
CreateHyphen
(
rInf
,
aGuess
);
if
(
rInf
.
GetFly
()
)
rInf
.
GetRoot
()
->
SetMidHyph
(
sal_T
rue
);
rInf
.
GetRoot
()
->
SetMidHyph
(
t
rue
);
else
rInf
.
GetRoot
()
->
SetEndHyph
(
sal_T
rue
);
rInf
.
GetRoot
()
->
SetEndHyph
(
t
rue
);
}
// case C1
// - Footnote portions with fake line start (i.e., not at beginning of line)
...
...
@@ -441,7 +441,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
(
!
bFirstPor
||
rInf
.
GetFly
()
||
rInf
.
GetLast
()
->
IsFlyPortion
()
||
rInf
.
IsFirstMulti
()
)
&&
(
!
rInf
.
GetLast
()
->
IsBlankPortion
()
||
((
SwBlankPortion
*
)
rInf
.
GetLast
())
->
MayUnderFlow
(
rInf
,
rInf
.
GetIdx
()
-
1
,
sal_T
rue
)))
rInf
.
GetLast
())
->
MayUnderFlow
(
rInf
,
rInf
.
GetIdx
()
-
1
,
t
rue
)))
{
// case C1 (former BreakUnderflow())
BreakUnderflow
(
rInf
);
}
...
...
sw/source/core/text/portxt.hxx
Dosyayı görüntüle @
31ae7d51
...
...
@@ -34,7 +34,7 @@ class SwTxtPortion : public SwLinePortion
{
void
BreakCut
(
SwTxtFormatInfo
&
rInf
,
const
SwTxtGuess
&
rGuess
);
void
BreakUnderflow
(
SwTxtFormatInfo
&
rInf
);
sal_B
ool
_Format
(
SwTxtFormatInfo
&
rInf
);
b
ool
_Format
(
SwTxtFormatInfo
&
rInf
);
public
:
inline
SwTxtPortion
(){
SetWhichPor
(
POR_TXT
);
}
...
...
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