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
706fee2f
Kaydet (Commit)
706fee2f
authored
Şub 26, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
editeng: sal_Bool->bool
Change-Id: I69c210b79f4d1b64863ac0ab2b012f033f40fe10
üst
2a4a74a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
47 deletions
+47
-47
rtfitem.cxx
editeng/source/rtf/rtfitem.cxx
+8
-8
svxrtf.cxx
editeng/source/rtf/svxrtf.cxx
+28
-28
svxrtf.hxx
include/editeng/svxrtf.hxx
+11
-11
No files found.
editeng/source/rtf/rtfitem.cxx
Dosyayı görüntüle @
706fee2f
...
@@ -213,7 +213,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
...
@@ -213,7 +213,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
FontUnderline
eUnderline
;
FontUnderline
eUnderline
;
FontUnderline
eOverline
;
FontUnderline
eOverline
;
FontEmphasisMark
eEmphasis
;
FontEmphasisMark
eEmphasis
;
bPardTokenRead
=
sal_F
alse
;
bPardTokenRead
=
f
alse
;
RTF_CharTypeDef
eCharType
=
NOTDEF_CHARTYPE
;
RTF_CharTypeDef
eCharType
=
NOTDEF_CHARTYPE
;
sal_uInt16
nFontAlign
;
sal_uInt16
nFontAlign
;
...
@@ -227,7 +227,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
...
@@ -227,7 +227,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
RTFPardPlain
(
sal_True
,
&
pSet
);
RTFPardPlain
(
sal_True
,
&
pSet
);
ResetPard
();
ResetPard
();
nStyleNo
=
0
;
nStyleNo
=
0
;
bPardTokenRead
=
sal_T
rue
;
bPardTokenRead
=
t
rue
;
break
;
break
;
case
RTF_PLAIN
:
case
RTF_PLAIN
:
...
@@ -987,10 +987,10 @@ ATTR_SETOVERLINE:
...
@@ -987,10 +987,10 @@ ATTR_SETOVERLINE:
break
;
break
;
case
RTF_RTLCH
:
case
RTF_RTLCH
:
bIsLeftToRightDef
=
sal_F
alse
;
bIsLeftToRightDef
=
f
alse
;
break
;
break
;
case
RTF_LTRCH
:
case
RTF_LTRCH
:
bIsLeftToRightDef
=
sal_T
rue
;
bIsLeftToRightDef
=
t
rue
;
break
;
break
;
case
RTF_RTLPAR
:
case
RTF_RTLPAR
:
if
(
PARDID
->
nDirection
)
if
(
PARDID
->
nDirection
)
...
@@ -1821,10 +1821,10 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
...
@@ -1821,10 +1821,10 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
SfxItemSet
aTmp
(
*
pAttrPool
,
&
aWhichMap
[
0
]
);
SfxItemSet
aTmp
(
*
pAttrPool
,
&
aWhichMap
[
0
]
);
sal_Bool
bOldFlag
=
bIsLeftToRightDef
;
sal_Bool
bOldFlag
=
bIsLeftToRightDef
;
bIsLeftToRightDef
=
sal_T
rue
;
bIsLeftToRightDef
=
t
rue
;
switch
(
nToken
)
switch
(
nToken
)
{
{
case
RTF_ADEFF
:
bIsLeftToRightDef
=
sal_F
alse
;
// no break!
case
RTF_ADEFF
:
bIsLeftToRightDef
=
f
alse
;
// no break!
case
RTF_DEFF
:
case
RTF_DEFF
:
{
{
if
(
-
1
==
nValue
)
if
(
-
1
==
nValue
)
...
@@ -1838,7 +1838,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
...
@@ -1838,7 +1838,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
}
}
break
;
break
;
case
RTF_ADEFLANG
:
bIsLeftToRightDef
=
sal_F
alse
;
// no break!
case
RTF_ADEFLANG
:
bIsLeftToRightDef
=
f
alse
;
// no break!
case
RTF_DEFLANG
:
case
RTF_DEFLANG
:
// store default Language
// store default Language
if
(
-
1
!=
nValue
)
if
(
-
1
!=
nValue
)
...
@@ -1853,7 +1853,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
...
@@ -1853,7 +1853,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
if
(
PARDID
->
nTabStop
)
if
(
PARDID
->
nTabStop
)
{
{
// RTF defines 720 twips as default
// RTF defines 720 twips as default
bIsSetDfltTab
=
sal_T
rue
;
bIsSetDfltTab
=
t
rue
;
if
(
-
1
==
nValue
||
!
nValue
)
if
(
-
1
==
nValue
||
!
nValue
)
nValue
=
720
;
nValue
=
720
;
...
...
editeng/source/rtf/svxrtf.cxx
Dosyayı görüntüle @
706fee2f
...
@@ -70,14 +70,14 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
...
@@ -70,14 +70,14 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
,
nVersionNo
(
0
)
,
nVersionNo
(
0
)
,
nDfltFont
(
0
)
,
nDfltFont
(
0
)
,
bNewDoc
(
bReadNewDoc
)
,
bNewDoc
(
bReadNewDoc
)
,
bNewGroup
(
sal_F
alse
)
,
bNewGroup
(
f
alse
)
,
bIsSetDfltTab
(
sal_F
alse
)
,
bIsSetDfltTab
(
f
alse
)
,
bChkStyleAttr
(
sal_F
alse
)
,
bChkStyleAttr
(
f
alse
)
,
bCalcValue
(
sal_F
alse
)
,
bCalcValue
(
f
alse
)
,
bPardTokenRead
(
sal_F
alse
)
,
bPardTokenRead
(
f
alse
)
,
bReadDocInfo
(
sal_F
alse
)
,
bReadDocInfo
(
f
alse
)
,
bIsLeftToRightDef
(
sal_T
rue
)
,
bIsLeftToRightDef
(
t
rue
)
,
bIsInReadStyleTab
(
sal_F
alse
)
,
bIsInReadStyleTab
(
f
alse
)
{
{
{
{
...
@@ -143,8 +143,8 @@ SvParserState SvxRTFParser::CallParser()
...
@@ -143,8 +143,8 @@ SvParserState SvxRTFParser::CallParser()
if
(
!
aAttrStack
.
empty
()
)
if
(
!
aAttrStack
.
empty
()
)
ClearAttrStack
();
ClearAttrStack
();
bIsSetDfltTab
=
sal_F
alse
;
bIsSetDfltTab
=
f
alse
;
bNewGroup
=
sal_F
alse
;
bNewGroup
=
f
alse
;
nDfltFont
=
0
;
nDfltFont
=
0
;
sBaseURL
=
""
;
sBaseURL
=
""
;
...
@@ -321,14 +321,14 @@ INSINGLECHAR:
...
@@ -321,14 +321,14 @@ INSINGLECHAR:
void
SvxRTFParser
::
ReadStyleTable
()
void
SvxRTFParser
::
ReadStyleTable
()
{
{
int
nToken
,
bSaveChkStyleAttr
=
bChkStyleAttr
;
int
nToken
,
bSaveChkStyleAttr
=
bChkStyleAttr
?
1
:
0
;
sal_uInt16
nStyleNo
=
0
;
sal_uInt16
nStyleNo
=
0
;
int
_nOpenBrakets
=
1
;
// the first was already detected earlier!!
int
_nOpenBrakets
=
1
;
// the first was already detected earlier!!
SvxRTFStyleType
*
pStyle
=
new
SvxRTFStyleType
(
*
pAttrPool
,
&
aWhichMap
[
0
]
);
SvxRTFStyleType
*
pStyle
=
new
SvxRTFStyleType
(
*
pAttrPool
,
&
aWhichMap
[
0
]
);
pStyle
->
aAttrSet
.
Put
(
GetRTFDefaults
()
);
pStyle
->
aAttrSet
.
Put
(
GetRTFDefaults
()
);
bIsInReadStyleTab
=
sal_T
rue
;
bIsInReadStyleTab
=
t
rue
;
bChkStyleAttr
=
sal_F
alse
;
// Do not check Attribute against the Styles
bChkStyleAttr
=
f
alse
;
// Do not check Attribute against the Styles
while
(
_nOpenBrakets
&&
IsParserWorking
()
)
while
(
_nOpenBrakets
&&
IsParserWorking
()
)
{
{
...
@@ -359,13 +359,13 @@ void SvxRTFParser::ReadStyleTable()
...
@@ -359,13 +359,13 @@ void SvxRTFParser::ReadStyleTable()
}
}
break
;
break
;
case
RTF_SBASEDON
:
pStyle
->
nBasedOn
=
sal_uInt16
(
nTokenValue
);
pStyle
->
bBasedOnIsSet
=
sal_T
rue
;
break
;
case
RTF_SBASEDON
:
pStyle
->
nBasedOn
=
sal_uInt16
(
nTokenValue
);
pStyle
->
bBasedOnIsSet
=
t
rue
;
break
;
case
RTF_SNEXT
:
pStyle
->
nNext
=
sal_uInt16
(
nTokenValue
);
break
;
case
RTF_SNEXT
:
pStyle
->
nNext
=
sal_uInt16
(
nTokenValue
);
break
;
case
RTF_OUTLINELEVEL
:
case
RTF_OUTLINELEVEL
:
case
RTF_SOUTLVL
:
pStyle
->
nOutlineNo
=
sal_uInt8
(
nTokenValue
);
break
;
case
RTF_SOUTLVL
:
pStyle
->
nOutlineNo
=
sal_uInt8
(
nTokenValue
);
break
;
case
RTF_S
:
nStyleNo
=
(
short
)
nTokenValue
;
break
;
case
RTF_S
:
nStyleNo
=
(
short
)
nTokenValue
;
break
;
case
RTF_CS
:
nStyleNo
=
(
short
)
nTokenValue
;
case
RTF_CS
:
nStyleNo
=
(
short
)
nTokenValue
;
pStyle
->
bIsCharFmt
=
sal_T
rue
;
pStyle
->
bIsCharFmt
=
t
rue
;
break
;
break
;
case
RTF_TEXTTOKEN
:
case
RTF_TEXTTOKEN
:
...
@@ -415,7 +415,7 @@ void SvxRTFParser::ReadStyleTable()
...
@@ -415,7 +415,7 @@ void SvxRTFParser::ReadStyleTable()
// Flag back to old state
// Flag back to old state
bChkStyleAttr
=
bSaveChkStyleAttr
;
bChkStyleAttr
=
bSaveChkStyleAttr
;
bIsInReadStyleTab
=
sal_F
alse
;
bIsInReadStyleTab
=
f
alse
;
}
}
void
SvxRTFParser
::
ReadColorTable
()
void
SvxRTFParser
::
ReadColorTable
()
...
@@ -468,7 +468,7 @@ void SvxRTFParser::ReadFontTable()
...
@@ -468,7 +468,7 @@ void SvxRTFParser::ReadFontTable()
Font
*
pFont
=
new
Font
();
Font
*
pFont
=
new
Font
();
short
nFontNo
(
0
),
nInsFontNo
(
0
);
short
nFontNo
(
0
),
nInsFontNo
(
0
);
OUString
sAltNm
,
sFntNm
;
OUString
sAltNm
,
sFntNm
;
sal_Bool
bIsAltFntNm
=
sal_F
alse
,
bCheckNewFont
;
bool
bIsAltFntNm
=
f
alse
,
bCheckNewFont
;
rtl_TextEncoding
nSystemChar
=
lcl_GetDefaultTextEncodingForRTF
();
rtl_TextEncoding
nSystemChar
=
lcl_GetDefaultTextEncodingForRTF
();
pFont
->
SetCharSet
(
nSystemChar
);
pFont
->
SetCharSet
(
nSystemChar
);
...
@@ -476,16 +476,16 @@ void SvxRTFParser::ReadFontTable()
...
@@ -476,16 +476,16 @@ void SvxRTFParser::ReadFontTable()
while
(
_nOpenBrakets
&&
IsParserWorking
()
)
while
(
_nOpenBrakets
&&
IsParserWorking
()
)
{
{
bCheckNewFont
=
sal_F
alse
;
bCheckNewFont
=
f
alse
;
switch
(
(
nToken
=
GetNextToken
()
))
switch
(
(
nToken
=
GetNextToken
()
))
{
{
case
'}'
:
case
'}'
:
bIsAltFntNm
=
sal_F
alse
;
bIsAltFntNm
=
f
alse
;
// Style has been completely read,
// Style has been completely read,
// so this is still a stable status
// so this is still a stable status
if
(
--
_nOpenBrakets
<=
1
&&
IsParserWorking
()
)
if
(
--
_nOpenBrakets
<=
1
&&
IsParserWorking
()
)
SaveState
(
RTF_FONTTBL
);
SaveState
(
RTF_FONTTBL
);
bCheckNewFont
=
sal_T
rue
;
bCheckNewFont
=
t
rue
;
nInsFontNo
=
nFontNo
;
nInsFontNo
=
nFontNo
;
break
;
break
;
case
'{'
:
case
'{'
:
...
@@ -555,12 +555,12 @@ void SvxRTFParser::ReadFontTable()
...
@@ -555,12 +555,12 @@ void SvxRTFParser::ReadFontTable()
}
}
break
;
break
;
case
RTF_F
:
case
RTF_F
:
bCheckNewFont
=
sal_T
rue
;
bCheckNewFont
=
t
rue
;
nInsFontNo
=
nFontNo
;
nInsFontNo
=
nFontNo
;
nFontNo
=
(
short
)
nTokenValue
;
nFontNo
=
(
short
)
nTokenValue
;
break
;
break
;
case
RTF_FALT
:
case
RTF_FALT
:
bIsAltFntNm
=
sal_T
rue
;
bIsAltFntNm
=
t
rue
;
break
;
break
;
case
RTF_TEXTTOKEN
:
case
RTF_TEXTTOKEN
:
DelCharAtEnd
(
aToken
,
';'
);
DelCharAtEnd
(
aToken
,
';'
);
...
@@ -648,7 +648,7 @@ OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr )
...
@@ -648,7 +648,7 @@ OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr )
util
::
DateTime
SvxRTFParser
::
GetDateTimeStamp
(
)
util
::
DateTime
SvxRTFParser
::
GetDateTimeStamp
(
)
{
{
util
::
DateTime
aDT
;
util
::
DateTime
aDT
;
sal_Bool
bContinue
=
sal_T
rue
;
bool
bContinue
=
t
rue
;
while
(
bContinue
&&
IsParserWorking
()
)
while
(
bContinue
&&
IsParserWorking
()
)
{
{
...
@@ -661,7 +661,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
...
@@ -661,7 +661,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
case
RTF_HR
:
aDT
.
Hours
=
(
sal_uInt16
)
nTokenValue
;
break
;
case
RTF_HR
:
aDT
.
Hours
=
(
sal_uInt16
)
nTokenValue
;
break
;
case
RTF_MIN
:
aDT
.
Minutes
=
(
sal_uInt16
)
nTokenValue
;
break
;
case
RTF_MIN
:
aDT
.
Minutes
=
(
sal_uInt16
)
nTokenValue
;
break
;
default
:
default
:
bContinue
=
sal_F
alse
;
bContinue
=
f
alse
;
}
}
}
}
SkipToken
(
-
1
);
// the closing brace is evaluated "above"
SkipToken
(
-
1
);
// the closing brace is evaluated "above"
...
@@ -844,7 +844,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
...
@@ -844,7 +844,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
pNew
->
SetRTFDefaults
(
GetRTFDefaults
()
);
pNew
->
SetRTFDefaults
(
GetRTFDefaults
()
);
aAttrStack
.
push_back
(
pNew
);
aAttrStack
.
push_back
(
pNew
);
bNewGroup
=
sal_F
alse
;
bNewGroup
=
f
alse
;
return
pNew
;
return
pNew
;
}
}
...
@@ -1064,7 +1064,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
...
@@ -1064,7 +1064,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
if
(
pOld
)
if
(
pOld
)
delete
pOld
;
delete
pOld
;
bNewGroup
=
sal_F
alse
;
bNewGroup
=
f
alse
;
}
}
}
}
...
@@ -1149,9 +1149,9 @@ SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRa
...
@@ -1149,9 +1149,9 @@ SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRa
{
{
nOutlineNo
=
sal_uInt8
(
-
1
);
// not set
nOutlineNo
=
sal_uInt8
(
-
1
);
// not set
nBasedOn
=
0
;
nBasedOn
=
0
;
bBasedOnIsSet
=
sal_F
alse
;
//$flr #117411#
bBasedOnIsSet
=
f
alse
;
//$flr #117411#
nNext
=
0
;
nNext
=
0
;
bIsCharFmt
=
sal_F
alse
;
bIsCharFmt
=
f
alse
;
}
}
...
...
include/editeng/svxrtf.hxx
Dosyayı görüntüle @
706fee2f
...
@@ -91,9 +91,9 @@ struct SvxRTFStyleType
...
@@ -91,9 +91,9 @@ struct SvxRTFStyleType
SfxItemSet
aAttrSet
;
// the attributes of Style (+ derivate!)
SfxItemSet
aAttrSet
;
// the attributes of Style (+ derivate!)
OUString
sName
;
OUString
sName
;
sal_uInt16
nBasedOn
,
nNext
;
sal_uInt16
nBasedOn
,
nNext
;
sal_B
ool
bBasedOnIsSet
;
b
ool
bBasedOnIsSet
;
sal_uInt8
nOutlineNo
;
sal_uInt8
nOutlineNo
;
sal_B
ool
bIsCharFmt
;
b
ool
bIsCharFmt
;
SvxRTFStyleType
(
SfxItemPool
&
rPool
,
const
sal_uInt16
*
pWhichRange
);
SvxRTFStyleType
(
SfxItemPool
&
rPool
,
const
sal_uInt16
*
pWhichRange
);
};
};
...
@@ -198,16 +198,16 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser
...
@@ -198,16 +198,16 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser
long
nVersionNo
;
long
nVersionNo
;
int
nDfltFont
;
int
nDfltFont
;
sal_B
ool
bNewDoc
:
1
;
// sal_False - Reading in an existing
b
ool
bNewDoc
:
1
;
// sal_False - Reading in an existing
sal_B
ool
bNewGroup
:
1
;
// sal_True - there was an opening parenthesis
b
ool
bNewGroup
:
1
;
// sal_True - there was an opening parenthesis
sal_B
ool
bIsSetDfltTab
:
1
;
// sal_True - DefTab was loaded
b
ool
bIsSetDfltTab
:
1
;
// sal_True - DefTab was loaded
sal_B
ool
bChkStyleAttr
:
1
;
// sal_True - StyleSheets are evaluated
b
ool
bChkStyleAttr
:
1
;
// sal_True - StyleSheets are evaluated
sal_B
ool
bCalcValue
:
1
;
// sal_True - Twip values adapt to App
b
ool
bCalcValue
:
1
;
// sal_True - Twip values adapt to App
sal_B
ool
bPardTokenRead
:
1
;
// sal_True - Token \pard was detected
b
ool
bPardTokenRead
:
1
;
// sal_True - Token \pard was detected
sal_B
ool
bReadDocInfo
:
1
;
// sal_True - DocInfo to read
b
ool
bReadDocInfo
:
1
;
// sal_True - DocInfo to read
sal_B
ool
bIsLeftToRightDef
:
1
;
// sal_True - in LeftToRight char run def.
b
ool
bIsLeftToRightDef
:
1
;
// sal_True - in LeftToRight char run def.
// sal_False - in RightToLeft char run def.
// sal_False - in RightToLeft char run def.
sal_B
ool
bIsInReadStyleTab
:
1
;
// sal_True - in ReadStyleTable
b
ool
bIsInReadStyleTab
:
1
;
// sal_True - in ReadStyleTable
void
ClearColorTbl
();
void
ClearColorTbl
();
void
ClearFontTbl
();
void
ClearFontTbl
();
...
...
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