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
b3059732
Kaydet (Commit)
b3059732
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: I75ac690e9ad79e08df5682a403296f433a1e7fd5
üst
c25ebf75
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
60 deletions
+59
-60
itradj.cxx
sw/source/core/text/itradj.cxx
+2
-2
itrcrsr.cxx
sw/source/core/text/itrcrsr.cxx
+8
-8
itrtxt.cxx
sw/source/core/text/itrtxt.cxx
+17
-18
itrtxt.hxx
sw/source/core/text/itrtxt.hxx
+29
-29
txtdrop.cxx
sw/source/core/text/txtdrop.cxx
+2
-2
txtftn.cxx
sw/source/core/text/txtftn.cxx
+1
-1
No files found.
sw/source/core/text/itradj.cxx
Dosyayı görüntüle @
b3059732
...
...
@@ -47,7 +47,7 @@ void SwTxtAdjuster::FormatBlock( )
const
SwLinePortion
*
pFly
=
0
;
sal_B
ool
bSkip
=
!
IsLastBlock
()
&&
b
ool
bSkip
=
!
IsLastBlock
()
&&
nStart
+
pCurr
->
GetLen
()
>=
GetInfo
().
GetTxt
().
getLength
();
// Multi-line fields are tricky, because we need to check whether there are
...
...
@@ -61,7 +61,7 @@ void SwTxtAdjuster::FormatBlock( )
while
(
pPor
&&
bSkip
)
{
if
(
pPor
->
InTxtGrp
()
)
bSkip
=
sal_F
alse
;
bSkip
=
f
alse
;
pPor
=
pPor
->
GetPortion
();
}
pLay
=
bSkip
?
pLay
->
GetNext
()
:
0
;
...
...
sw/source/core/text/itrcrsr.cxx
Dosyayı görüntüle @
b3059732
...
...
@@ -50,7 +50,7 @@
// Not reentrant !!!
// is set in GetCharRect and is interpreted in UnitUp/Down.
sal_Bool
SwTxtCursor
::
bRightMargin
=
sal_F
alse
;
bool
SwTxtCursor
::
bRightMargin
=
f
alse
;
/*************************************************************************
...
...
@@ -418,11 +418,11 @@ void SwTxtCursor::CtorInitTxtCursor( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
// 1170: Ancient bug: Shift-End forgets the last character ...
sal_B
ool
SwTxtCursor
::
GetEndCharRect
(
SwRect
*
pOrig
,
const
sal_Int32
nOfst
,
b
ool
SwTxtCursor
::
GetEndCharRect
(
SwRect
*
pOrig
,
const
sal_Int32
nOfst
,
SwCrsrMoveState
*
pCMS
,
const
long
nMax
)
{
// 1170: Ambiguity of document positions
bRightMargin
=
sal_T
rue
;
bRightMargin
=
t
rue
;
CharCrsrToLine
(
nOfst
);
// Somehow twisted: nOfst names the position behind the last
...
...
@@ -431,7 +431,7 @@ sal_Bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if
(
nOfst
!=
GetStart
()
||
!
pCurr
->
GetLen
()
)
{
// 8810: Master line RightMargin, after that LeftMargin
const
sal_B
ool
bRet
=
GetCharRect
(
pOrig
,
nOfst
,
pCMS
,
nMax
);
const
b
ool
bRet
=
GetCharRect
(
pOrig
,
nOfst
,
pCMS
,
nMax
);
bRightMargin
=
nOfst
>=
GetEnd
()
&&
nOfst
<
GetInfo
().
GetTxt
().
getLength
();
return
bRet
;
}
...
...
@@ -483,7 +483,7 @@ sal_Bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pCMS
->
aRealHeight
.
Y
()
=
nPorHeight
;
}
return
sal_T
rue
;
return
t
rue
;
}
/*************************************************************************
...
...
@@ -899,7 +899,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
pCurr
=
pOldCurr
;
nStart
=
nOldStart
;
nY
=
nOldY
;
bPrev
=
sal_F
alse
;
bPrev
=
f
alse
;
return
;
}
...
...
@@ -1198,7 +1198,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
* SwTxtCursor::GetCharRect()
*************************************************************************/
sal_B
ool
SwTxtCursor
::
GetCharRect
(
SwRect
*
pOrig
,
const
sal_Int32
nOfst
,
b
ool
SwTxtCursor
::
GetCharRect
(
SwRect
*
pOrig
,
const
sal_Int32
nOfst
,
SwCrsrMoveState
*
pCMS
,
const
long
nMax
)
{
CharCrsrToLine
(
nOfst
);
...
...
@@ -1228,7 +1228,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
GetAdjusted
();
const
Point
aCharPos
(
GetTopLeft
()
);
sal_Bool
bRet
=
sal_T
rue
;
bool
bRet
=
t
rue
;
_GetCharRect
(
pOrig
,
nFindOfst
,
pCMS
);
...
...
sw/source/core/text/itrtxt.cxx
Dosyayı görüntüle @
b3059732
...
...
@@ -50,10 +50,10 @@ void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
aLineInf
.
CtorInitLineInfo
(
pNode
->
GetSwAttrSet
(),
*
pNode
);
nFrameStart
=
pFrm
->
Frm
().
Pos
().
Y
()
+
pFrm
->
Prt
().
Pos
().
Y
();
SwTxtIter
::
Init
();
if
(
pNode
->
GetSwAttrSet
().
GetRegister
().
GetValue
()
)
bRegisterOn
=
pFrm
->
FillRegister
(
nRegStart
,
nRegDiff
);
else
bRegisterOn
=
sal_False
;
// Order is important: only execute FillRegister if GetValue!=0
bRegisterOn
=
pNode
->
GetSwAttrSet
().
GetRegister
().
GetValue
()
&&
pFrm
->
FillRegister
(
nRegStart
,
nRegDiff
)
;
}
/*************************************************************************
...
...
@@ -65,7 +65,7 @@ void SwTxtIter::Init()
pCurr
=
pInf
->
GetParaPortion
();
nStart
=
pInf
->
GetTxtStart
();
nY
=
nFrameStart
;
bPrev
=
sal_T
rue
;
bPrev
=
t
rue
;
pPrev
=
0
;
nLineNr
=
1
;
}
...
...
@@ -87,7 +87,7 @@ void SwTxtIter::CalcAscentAndHeight( KSHORT &rAscent, KSHORT &rHeight ) const
SwLineLayout
*
SwTxtIter
::
_GetPrev
()
{
pPrev
=
0
;
bPrev
=
sal_T
rue
;
bPrev
=
t
rue
;
SwLineLayout
*
pLay
=
pInf
->
GetParaPortion
();
if
(
pCurr
==
pLay
)
return
0
;
...
...
@@ -117,7 +117,7 @@ const SwLineLayout *SwTxtIter::Prev()
_GetPrev
();
if
(
pPrev
)
{
bPrev
=
sal_F
alse
;
bPrev
=
f
alse
;
pCurr
=
pPrev
;
nStart
=
nStart
-
pCurr
->
GetLen
();
nY
=
nY
-
GetLineHeight
();
...
...
@@ -138,7 +138,7 @@ const SwLineLayout *SwTxtIter::Next()
if
(
pCurr
->
GetNext
())
{
pPrev
=
pCurr
;
bPrev
=
sal_T
rue
;
bPrev
=
t
rue
;
nStart
=
nStart
+
pCurr
->
GetLen
();
nY
+=
GetLineHeight
();
if
(
pCurr
->
GetLen
()
||
(
nLineNr
>
1
&&
!
pCurr
->
IsDummy
()
)
)
...
...
@@ -259,11 +259,11 @@ const SwLineLayout *SwTxtCursor::CharCrsrToLine( const sal_Int32 nPosition )
{
CharToLine
(
nPosition
);
if
(
nPosition
!=
nStart
)
bRightMargin
=
sal_F
alse
;
sal_B
ool
bPrevious
=
bRightMargin
&&
pCurr
->
GetLen
()
&&
GetPrev
()
&&
bRightMargin
=
f
alse
;
b
ool
bPrevious
=
bRightMargin
&&
pCurr
->
GetLen
()
&&
GetPrev
()
&&
GetPrev
()
->
GetLen
();
if
(
bPrevious
&&
nPosition
&&
CH_BREAK
==
GetInfo
().
GetChar
(
nPosition
-
1
)
)
bPrevious
=
sal_F
alse
;
bPrevious
=
f
alse
;
return
bPrevious
?
PrevLine
()
:
pCurr
;
}
...
...
@@ -274,7 +274,7 @@ const SwLineLayout *SwTxtCursor::CharCrsrToLine( const sal_Int32 nPosition )
sal_uInt16
SwTxtCursor
::
AdjustBaseLine
(
const
SwLineLayout
&
rLine
,
const
SwLinePortion
*
pPor
,
sal_uInt16
nPorHeight
,
sal_uInt16
nPorAscent
,
const
sal_B
ool
bAutoToCentered
)
const
const
b
ool
bAutoToCentered
)
const
{
if
(
pPor
)
{
...
...
@@ -285,12 +285,11 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
sal_uInt16
nOfst
=
rLine
.
GetRealHeight
()
-
rLine
.
Height
();
GETGRID
(
pFrm
->
FindPageFrm
()
)
const
sal_Bool
bHasGrid
=
pGrid
&&
GetInfo
().
SnapToGrid
();
if
(
bHasGrid
)
if
(
pGrid
&&
GetInfo
().
SnapToGrid
()
)
{
const
sal_uInt16
nRubyHeight
=
pGrid
->
GetRubyHeight
();
const
sal_B
ool
bRubyTop
=
!
pGrid
->
GetRubyTextBelow
();
const
b
ool
bRubyTop
=
!
pGrid
->
GetRubyTextBelow
();
if
(
GetInfo
().
IsMulti
()
)
// we are inside the GetCharRect recursion for multi portions
...
...
@@ -315,7 +314,7 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
// nGridWidth;
nOfst
+=
(
nLineNetto
-
nPorHeight
)
/
2
;
if
(
bRubyTop
)
nOfst
=
nOfst
+
nRubyHeight
;
nOfst
+=
nRubyHeight
;
}
}
}
...
...
@@ -368,10 +367,10 @@ const SwLineLayout *SwTxtIter::TwipsToLine( const SwTwips y)
//
// Local helper function to check, if pCurr needs a field rest portion:
//
static
sal_B
ool
lcl_NeedsFieldRest
(
const
SwLineLayout
*
pCurr
)
static
b
ool
lcl_NeedsFieldRest
(
const
SwLineLayout
*
pCurr
)
{
const
SwLinePortion
*
pPor
=
pCurr
->
GetPortion
();
sal_Bool
bRet
=
sal_F
alse
;
bool
bRet
=
f
alse
;
while
(
pPor
&&
!
bRet
)
{
bRet
=
pPor
->
InFldGrp
()
&&
((
SwFldPortion
*
)
pPor
)
->
HasFollow
();
...
...
sw/source/core/text/itrtxt.hxx
Dosyayı görüntüle @
b3059732
...
...
@@ -46,11 +46,11 @@ protected:
sal_Int32
nStart
;
// Start in the text string, end = pCurr->GetLen()
KSHORT
nRegDiff
;
// Register's line distance
MSHORT
nLineNr
;
// Line number
sal_B
ool
bPrev
:
1
;
sal_B
ool
bRegisterOn
:
1
;
// Keep in register
sal_B
ool
bOneBlock
:
1
;
// Justified text: Dispose single words
sal_B
ool
bLastBlock
:
1
;
// Justified text: Also the last line
sal_B
ool
bLastCenter
:
1
;
// Justified text: Center last line
b
ool
bPrev
:
1
;
b
ool
bRegisterOn
:
1
;
// Keep in register
b
ool
bOneBlock
:
1
;
// Justified text: Dispose single words
b
ool
bLastBlock
:
1
;
// Justified text: Also the last line
b
ool
bLastCenter
:
1
;
// Justified text: Center last line
SwLineLayout
*
_GetPrev
();
...
...
@@ -69,18 +69,18 @@ protected:
,
nStart
(
0
)
,
nRegDiff
(
0
)
,
nLineNr
(
0
)
,
bPrev
(
sal_F
alse
)
,
bRegisterOn
(
sal_F
alse
)
,
bOneBlock
(
sal_F
alse
)
,
bLastBlock
(
sal_F
alse
)
,
bLastCenter
(
sal_F
alse
)
,
bPrev
(
f
alse
)
,
bRegisterOn
(
f
alse
)
,
bOneBlock
(
f
alse
)
,
bLastBlock
(
f
alse
)
,
bLastCenter
(
f
alse
)
{}
public
:
inline
SwTxtIter
(
SwTxtFrm
*
pTxtFrm
,
SwTxtInfo
*
pTxtInf
)
:
SwAttrIter
(
pTxtFrm
!=
NULL
?
pTxtFrm
->
GetTxtNode
()
:
NULL
)
,
bOneBlock
(
sal_F
alse
)
,
bLastBlock
(
sal_F
alse
)
,
bLastCenter
(
sal_F
alse
)
,
bOneBlock
(
f
alse
)
,
bLastBlock
(
f
alse
)
,
bLastCenter
(
f
alse
)
{
CtorInitTxtIter
(
pTxtFrm
,
pTxtInf
);
}
...
...
@@ -95,7 +95,7 @@ public:
inline
SwTwips
RegStart
()
const
{
return
nRegStart
;
}
inline
KSHORT
RegDiff
()
const
{
return
nRegDiff
;
}
inline
sal_B
ool
IsRegisterOn
()
const
{
return
bRegisterOn
;
}
inline
b
ool
IsRegisterOn
()
const
{
return
bRegisterOn
;
}
inline
SwTxtInfo
&
GetInfo
()
{
return
*
pInf
;
}
inline
const
SwTxtInfo
&
GetInfo
()
const
{
return
*
pInf
;
}
...
...
@@ -131,9 +131,9 @@ public:
const
SwLineInfo
&
GetLineInfo
()
const
{
return
aLineInf
;
}
inline
SwTwips
GetFirstPos
()
const
{
return
nFrameStart
;
}
inline
sal_B
ool
SeekAndChg
(
SwTxtSizeInfo
&
rInf
);
inline
sal_B
ool
SeekAndChgBefore
(
SwTxtSizeInfo
&
rInf
);
inline
sal_Bool
SeekStartAndChg
(
SwTxtSizeInfo
&
rInf
,
const
sal_Bool
bPara
=
sal_F
alse
);
inline
b
ool
SeekAndChg
(
SwTxtSizeInfo
&
rInf
);
inline
b
ool
SeekAndChgBefore
(
SwTxtSizeInfo
&
rInf
);
inline
bool
SeekStartAndChg
(
SwTxtSizeInfo
&
rInf
,
const
bool
bPara
=
f
alse
);
inline
SwTxtFrm
*
GetTxtFrm
()
{
return
pFrm
;
}
inline
const
SwTxtFrm
*
GetTxtFrm
()
const
{
return
pFrm
;
}
...
...
@@ -193,9 +193,9 @@ public:
SwTwips
GetLineStart
()
const
;
inline
SwTwips
GetLineEnd
()
const
{
return
GetLineStart
()
+
CurrWidth
();
}
inline
Point
GetTopLeft
()
const
{
return
Point
(
GetLineStart
(),
Y
()
);
}
inline
sal_B
ool
IsOneBlock
()
const
{
return
bOneBlock
;
}
inline
sal_B
ool
IsLastBlock
()
const
{
return
bLastBlock
;
}
inline
sal_B
ool
IsLastCenter
()
const
{
return
bLastCenter
;
}
inline
b
ool
IsOneBlock
()
const
{
return
bOneBlock
;
}
inline
b
ool
IsLastBlock
()
const
{
return
bLastBlock
;
}
inline
b
ool
IsLastCenter
()
const
{
return
bLastCenter
;
}
inline
MSHORT
GetAdjust
()
const
{
return
nAdjust
;
}
inline
KSHORT
GetLineWidth
()
const
{
return
KSHORT
(
Right
()
-
GetLeftMargin
()
+
1
);
}
...
...
@@ -285,7 +285,7 @@ class SwTxtCursor : public SwTxtAdjuster
friend
class
SwTxtCursorSave
;
// Ambiguities
static
sal_B
ool
bRightMargin
;
static
b
ool
bRightMargin
;
void
_GetCharRect
(
SwRect
*
,
const
sal_Int32
,
SwCrsrMoveState
*
);
protected
:
void
CtorInitTxtCursor
(
SwTxtFrm
*
pFrm
,
SwTxtSizeInfo
*
pInf
);
...
...
@@ -293,9 +293,9 @@ protected:
public
:
inline
SwTxtCursor
(
SwTxtFrm
*
pTxtFrm
,
SwTxtSizeInfo
*
pTxtSizeInf
)
:
SwTxtAdjuster
(
pTxtFrm
!=
NULL
?
pTxtFrm
->
GetTxtNode
()
:
NULL
)
{
CtorInitTxtCursor
(
pTxtFrm
,
pTxtSizeInf
);
}
sal_B
ool
GetCharRect
(
SwRect
*
,
const
sal_Int32
,
SwCrsrMoveState
*
=
0
,
b
ool
GetCharRect
(
SwRect
*
,
const
sal_Int32
,
SwCrsrMoveState
*
=
0
,
const
long
nMax
=
0
);
sal_B
ool
GetEndCharRect
(
SwRect
*
,
const
sal_Int32
,
SwCrsrMoveState
*
=
0
,
b
ool
GetEndCharRect
(
SwRect
*
,
const
sal_Int32
,
SwCrsrMoveState
*
=
0
,
const
long
nMax
=
0
);
sal_Int32
GetCrsrOfst
(
SwPosition
*
pPos
,
const
Point
&
rPoint
,
const
MSHORT
nChgNode
,
SwCrsrMoveState
*
=
0
)
const
;
...
...
@@ -306,10 +306,10 @@ public:
// bAutoToCentered indicates, if AUTOMATIC mode means CENTERED or BASELINE
sal_uInt16
AdjustBaseLine
(
const
SwLineLayout
&
rLine
,
const
SwLinePortion
*
pPor
,
sal_uInt16
nPorHeight
=
0
,
sal_uInt16
nAscent
=
0
,
const
sal_Bool
bAutoToCentered
=
sal_F
alse
)
const
;
const
bool
bAutoToCentered
=
f
alse
)
const
;
static
inline
void
SetRightMargin
(
const
sal_B
ool
bNew
){
bRightMargin
=
bNew
;
}
static
inline
sal_B
ool
IsRightMargin
()
{
return
bRightMargin
;
}
static
inline
void
SetRightMargin
(
const
b
ool
bNew
){
bRightMargin
=
bNew
;
}
static
inline
b
ool
IsRightMargin
()
{
return
bRightMargin
;
}
};
/*************************************************************************
...
...
@@ -333,12 +333,12 @@ public:
* Inline implementation
*************************************************************************/
inline
sal_B
ool
SwTxtIter
::
SeekAndChg
(
SwTxtSizeInfo
&
rInf
)
inline
b
ool
SwTxtIter
::
SeekAndChg
(
SwTxtSizeInfo
&
rInf
)
{
return
SeekAndChgAttrIter
(
rInf
.
GetIdx
(),
rInf
.
GetOut
()
);
}
inline
sal_B
ool
SwTxtIter
::
SeekAndChgBefore
(
SwTxtSizeInfo
&
rInf
)
inline
b
ool
SwTxtIter
::
SeekAndChgBefore
(
SwTxtSizeInfo
&
rInf
)
{
if
(
rInf
.
GetIdx
()
)
return
SeekAndChgAttrIter
(
rInf
.
GetIdx
()
-
1
,
rInf
.
GetOut
()
);
...
...
@@ -346,7 +346,7 @@ inline sal_Bool SwTxtIter::SeekAndChgBefore( SwTxtSizeInfo &rInf )
return
SeekAndChgAttrIter
(
rInf
.
GetIdx
(),
rInf
.
GetOut
()
);
}
inline
sal_Bool
SwTxtIter
::
SeekStartAndChg
(
SwTxtSizeInfo
&
rInf
,
const
sal_B
ool
bPara
)
inline
bool
SwTxtIter
::
SeekStartAndChg
(
SwTxtSizeInfo
&
rInf
,
const
b
ool
bPara
)
{
return
SeekStartAndChgAttrIter
(
rInf
.
GetOut
(),
bPara
);
}
...
...
sw/source/core/text/txtdrop.cxx
Dosyayı görüntüle @
b3059732
...
...
@@ -490,8 +490,8 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
KSHORT
nAscent
=
0
;
KSHORT
nHeight
=
0
;
KSHORT
nDropLns
=
0
;
sal_B
ool
bRegisterOld
=
IsRegisterOn
();
bRegisterOn
=
sal_F
alse
;
const
b
ool
bRegisterOld
=
IsRegisterOn
();
bRegisterOn
=
f
alse
;
Top
();
...
...
sw/source/core/text/txtftn.cxx
Dosyayı görüntüle @
b3059732
...
...
@@ -1117,7 +1117,7 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
// Wir initialisieren uns also:
// ResetFont();
FeedInf
(
rInf
);
SeekStartAndChg
(
rInf
,
sal_T
rue
);
SeekStartAndChg
(
rInf
,
t
rue
);
if
(
GetRedln
()
&&
pCurr
->
HasRedline
()
)
GetRedln
()
->
Seek
(
*
pFnt
,
nOffset
,
0
);
...
...
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