Kaydet (Commit) ac0f9d32 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: I25394e009009ae9c111e929d493eb949c042e1bc
üst 7c2267be
...@@ -255,7 +255,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, ...@@ -255,7 +255,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
sal_Bool bOutStyles, sal_Bool bOutStyles,
LanguageType eDfltLang, LanguageType eDfltLang,
sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) : sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) :
pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( sal_False ) pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( false )
{ {
sal_uInt16 nRefPoolId = 0; sal_uInt16 nRefPoolId = 0;
// Den Selektor des Formats holen // Den Selektor des Formats holen
...@@ -556,7 +556,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, ...@@ -556,7 +556,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
rHWrt.aTxtCollInfos.insert( pFmtInfo ); rHWrt.aTxtCollInfos.insert( pFmtInfo );
String aName( rFmt.GetName() ); String aName( rFmt.GetName() );
if( 0 != rHWrt.aScriptParaStyles.count( aName ) ) if( 0 != rHWrt.aScriptParaStyles.count( aName ) )
((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = sal_True; ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = true;
} }
// Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist // Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist
...@@ -1656,7 +1656,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt, ...@@ -1656,7 +1656,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
rFmtInfos.insert( pFmtInfo ); rFmtInfos.insert( pFmtInfo );
String aName( rFmt.GetName() ); String aName( rFmt.GetName() );
if( 0 != rScriptTxtStyles.count( aName ) ) if( 0 != rScriptTxtStyles.count( aName ) )
((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = sal_True; ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = true;
} }
return pFmtInfo; return pFmtInfo;
...@@ -2943,7 +2943,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO ...@@ -2943,7 +2943,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO
rtl::OStringBuffer sOut; rtl::OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor); sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor);
sal_Bool bScriptDependent = sal_False; bool bScriptDependent = false;
{ {
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool( const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_NORMAL ); RES_POOLCHR_INET_NORMAL );
......
...@@ -487,9 +487,9 @@ static const SwFmtCol *lcl_html_GetFmtCol( const SwHTMLWriter& rHTMLWrt, ...@@ -487,9 +487,9 @@ static const SwFmtCol *lcl_html_GetFmtCol( const SwHTMLWriter& rHTMLWrt,
return pCol; return pCol;
} }
static sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex ) static bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{ {
sal_Bool bRet = sal_False; bool bRet = false;
const SwSectionNode *pSectNd = const SwSectionNode *pSectNd =
rHTMLWrt.pDoc->GetNodes()[nIndex]->GetSectionNode(); rHTMLWrt.pDoc->GetNodes()[nIndex]->GetSectionNode();
if( pSectNd ) if( pSectNd )
...@@ -497,15 +497,15 @@ static sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLon ...@@ -497,15 +497,15 @@ static sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLon
const SwSection& rSection = pSectNd->GetSection(); const SwSection& rSection = pSectNd->GetSection();
const SwSectionFmt *pFmt = rSection.GetFmt(); const SwSectionFmt *pFmt = rSection.GetFmt();
if( pFmt && lcl_html_GetFmtCol( rHTMLWrt, rSection, *pFmt ) ) if( pFmt && lcl_html_GetFmtCol( rHTMLWrt, rSection, *pFmt ) )
bRet = sal_True; bRet = true;
} }
return bRet; return bRet;
} }
static sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex ) static bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{ {
sal_Bool bRet = sal_False; bool bRet = false;
const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode(); const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode();
if( pEndNd ) if( pEndNd )
bRet = lcl_html_IsMultiColStart( rHTMLWrt, bRet = lcl_html_IsMultiColStart( rHTMLWrt,
...@@ -519,7 +519,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, ...@@ -519,7 +519,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
const SwSection& rSection, const SwSection& rSection,
const SwSectionFmt& rFmt, const SwSectionFmt& rFmt,
const SwFmtCol *pCol, const SwFmtCol *pCol,
sal_Bool bContinued=sal_False ) bool bContinued=false )
{ {
OSL_ENSURE( pCol || !bContinued, "Continuation of DIV" ); OSL_ENSURE( pCol || !bContinued, "Continuation of DIV" );
...@@ -558,7 +558,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, ...@@ -558,7 +558,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
String aEncURL( URIHelper::simpleNormalizedMakeRelative(rHTMLWrt.GetBaseURL(), aURL ) ); String aEncURL( URIHelper::simpleNormalizedMakeRelative(rHTMLWrt.GetBaseURL(), aURL ) );
sal_Unicode cDelim = 255U; sal_Unicode cDelim = 255U;
sal_Bool bURLContainsDelim = bool bURLContainsDelim =
(STRING_NOTFOUND != aEncURL.Search( cDelim ) ); (STRING_NOTFOUND != aEncURL.Search( cDelim ) );
HTMLOutFuncs::Out_String( rHTMLWrt.Strm(), aEncURL, HTMLOutFuncs::Out_String( rHTMLWrt.Strm(), aEncURL,
...@@ -651,8 +651,8 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) ...@@ -651,8 +651,8 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
const SwSectionFmt *pFmt = rSection.GetFmt(); const SwSectionFmt *pFmt = rSection.GetFmt();
OSL_ENSURE( pFmt, "Section without a format?" ); OSL_ENSURE( pFmt, "Section without a format?" );
sal_Bool bStartTag = sal_True; bool bStartTag = true;
sal_Bool bEndTag = sal_True; bool bEndTag = true;
const SwSectionFmt *pSurrFmt = 0; const SwSectionFmt *pSurrFmt = 0;
const SwSectionNode *pSurrSectNd = 0; const SwSectionNode *pSurrSectNd = 0;
const SwSection *pSurrSection = 0; const SwSection *pSurrSection = 0;
...@@ -666,11 +666,11 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) ...@@ -666,11 +666,11 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
// If the next node is a columned section node, too, don't export // If the next node is a columned section node, too, don't export
// an empty section. // an empty section.
if( lcl_html_IsMultiColStart( rHTMLWrt, nSectSttIdx+1 ) ) if( lcl_html_IsMultiColStart( rHTMLWrt, nSectSttIdx+1 ) )
bStartTag = sal_False; bStartTag = false;
// The same applies if the section end with another columned section. // The same applies if the section end with another columned section.
if( lcl_html_IsMultiColEnd( rHTMLWrt, nSectEndIdx-1 ) ) if( lcl_html_IsMultiColEnd( rHTMLWrt, nSectEndIdx-1 ) )
bEndTag = sal_False; bEndTag = false;
//.is there a columned section arround this one? //.is there a columned section arround this one?
const SwStartNode *pSttNd = rSectNd.StartOfSectionNode(); const SwStartNode *pSttNd = rSectNd.StartOfSectionNode();
...@@ -722,7 +722,7 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) ...@@ -722,7 +722,7 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
pSurrSectNd->EndOfSectionIndex() - nSectEndIdx > 1 && pSurrSectNd->EndOfSectionIndex() - nSectEndIdx > 1 &&
!lcl_html_IsMultiColStart( rHTMLWrt, nSectEndIdx+1 ) ) !lcl_html_IsMultiColStart( rHTMLWrt, nSectEndIdx+1 ) )
lcl_html_OutSectionStartTag( rHTMLWrt, *pSurrSection, *pSurrFmt, lcl_html_OutSectionStartTag( rHTMLWrt, *pSurrSection, *pSurrFmt,
pSurrCol, sal_True ); pSurrCol, true );
return rWrt; return rWrt;
} }
...@@ -813,9 +813,9 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt, ...@@ -813,9 +813,9 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt,
const SfxItemSet& rItemSet = pFmt->GetAttrSet(); const SfxItemSet& rItemSet = pFmt->GetAttrSet();
const SfxPoolItem *pRefItem = 0, *pItem = 0; const SfxPoolItem *pRefItem = 0, *pItem = 0;
sal_Bool bItemSet = SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_COLOR, bool bItemSet = SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_COLOR,
sal_True, &pItem); sal_True, &pItem);
sal_Bool bRefItemSet = pRefFmt && bool bRefItemSet = pRefFmt &&
SFX_ITEM_SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR, SFX_ITEM_SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR,
sal_True, &pRefItem); sal_True, &pRefItem);
if( bItemSet ) if( bItemSet )
......
...@@ -230,7 +230,7 @@ struct SwHTMLFmtInfo ...@@ -230,7 +230,7 @@ struct SwHTMLFmtInfo
sal_uInt16 nTopMargin; sal_uInt16 nTopMargin;
sal_uInt16 nBottomMargin; sal_uInt16 nBottomMargin;
sal_Bool bScriptDependent; bool bScriptDependent;
// Konstruktor fuer einen Dummy zum Suchen // Konstruktor fuer einen Dummy zum Suchen
SwHTMLFmtInfo( const SwFmt *pF ) : SwHTMLFmtInfo( const SwFmt *pF ) :
...@@ -245,13 +245,13 @@ struct SwHTMLFmtInfo ...@@ -245,13 +245,13 @@ struct SwHTMLFmtInfo
sal_Bool bHardDrop=sal_False ); sal_Bool bHardDrop=sal_False );
~SwHTMLFmtInfo(); ~SwHTMLFmtInfo();
friend sal_Bool operator==( const SwHTMLFmtInfo& rInfo1, friend bool operator==( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 ) const SwHTMLFmtInfo& rInfo2 )
{ {
return (long)rInfo1.pFmt == (long)rInfo2.pFmt; return (long)rInfo1.pFmt == (long)rInfo2.pFmt;
} }
friend sal_Bool operator<( const SwHTMLFmtInfo& rInfo1, friend bool operator<( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 ) const SwHTMLFmtInfo& rInfo2 )
{ {
return (long)rInfo1.pFmt < (long)rInfo2.pFmt; return (long)rInfo1.pFmt < (long)rInfo2.pFmt;
...@@ -544,8 +544,8 @@ public: ...@@ -544,8 +544,8 @@ public:
sal_uInt32 GetHTMLMode() const { return nHTMLMode; } sal_uInt32 GetHTMLMode() const { return nHTMLMode; }
sal_Bool IsHTMLMode( sal_uInt32 nMode ) const { return (nHTMLMode & nMode) != 0; } sal_Bool IsHTMLMode( sal_uInt32 nMode ) const { return (nHTMLMode & nMode) != 0; }
inline sal_Bool IsCSS1Source( sal_uInt16 n ) const; inline bool IsCSS1Source( sal_uInt16 n ) const;
inline sal_Bool IsCSS1Script( sal_uInt16 n ) const; inline bool IsCSS1Script( sal_uInt16 n ) const;
static const sal_Char *GetNumFormat( sal_uInt16 nFmt ); static const sal_Char *GetNumFormat( sal_uInt16 nFmt );
static void PrepareFontList( const SvxFontItem& rFontItem, String& rNames, static void PrepareFontList( const SvxFontItem& rFontItem, String& rNames,
...@@ -556,12 +556,12 @@ public: ...@@ -556,12 +556,12 @@ public:
FieldUnit GetCSS1Unit() const { return eCSS1Unit; } FieldUnit GetCSS1Unit() const { return eCSS1Unit; }
}; };
inline sal_Bool SwHTMLWriter::IsCSS1Source( sal_uInt16 n ) const inline bool SwHTMLWriter::IsCSS1Source( sal_uInt16 n ) const
{ {
return n == (nCSS1OutMode & CSS1_OUTMODE_SOURCE); return n == (nCSS1OutMode & CSS1_OUTMODE_SOURCE);
} }
inline sal_Bool SwHTMLWriter::IsCSS1Script( sal_uInt16 n ) const inline bool SwHTMLWriter::IsCSS1Script( sal_uInt16 n ) const
{ {
sal_uInt16 nScript = (nCSS1OutMode & CSS1_OUTMODE_SCRIPT); sal_uInt16 nScript = (nCSS1OutMode & CSS1_OUTMODE_SCRIPT);
return CSS1_OUTMODE_ANY_SCRIPT == nScript || n == nScript; return CSS1_OUTMODE_ANY_SCRIPT == nScript || n == nScript;
......
...@@ -52,7 +52,7 @@ inline void SwFltClearFlag(sal_uLong& rFieldFlags, int no) ...@@ -52,7 +52,7 @@ inline void SwFltClearFlag(sal_uLong& rFieldFlags, int no)
inline void SwFltSetFlag(sal_uLong& rFieldFlags, int no) inline void SwFltSetFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags |= 1L << no; } { rFieldFlags |= 1L << no; }
inline sal_Bool SwFltGetFlag(sal_uLong nFieldFlags, int no) inline bool SwFltGetFlag(sal_uLong nFieldFlags, int no)
{ return (nFieldFlags & (1L << no)) != 0; } { return (nFieldFlags & (1L << no)) != 0; }
//Subvert the Node/Content system to get positions which don't update as //Subvert the Node/Content system to get positions which don't update as
...@@ -134,7 +134,7 @@ class SW_DLLPUBLIC SwFltControlStack : private ::boost::noncopyable ...@@ -134,7 +134,7 @@ class SW_DLLPUBLIC SwFltControlStack : private ::boost::noncopyable
protected: protected:
SwDoc* pDoc; SwDoc* pDoc;
sal_Bool bIsEndStack; bool bIsEndStack;
void MoveAttrs( const SwPosition& rPos ); void MoveAttrs( const SwPosition& rPos );
virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry& rEntry); virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry& rEntry);
...@@ -156,7 +156,7 @@ public: ...@@ -156,7 +156,7 @@ public:
SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl); SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl);
virtual ~SwFltControlStack(); virtual ~SwFltControlStack();
sal_Bool IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);} bool IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr ); void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr );
...@@ -313,7 +313,7 @@ public: ...@@ -313,7 +313,7 @@ public:
SwFltEndStack(SwDoc* pDo, sal_uLong nFieldFl) SwFltEndStack(SwDoc* pDo, sal_uLong nFieldFl)
:SwFltControlStack(pDo, nFieldFl) :SwFltControlStack(pDo, nFieldFl)
{ {
bIsEndStack = sal_True; bIsEndStack = true;
} }
}; };
...@@ -640,7 +640,7 @@ public: ...@@ -640,7 +640,7 @@ public:
eSubMode = None; eSubMode = None;
} }
sal_Bool IsFlagSet(SwFltControlStack::Flags no) const bool IsFlagSet(SwFltControlStack::Flags no) const
{ return aStack.IsFlagSet(no); } { return aStack.IsFlagSet(no); }
void ConvertUStr( String& rInOut ); void ConvertUStr( String& rInOut );
OUString QuoteStr( const OUString& rIn ); OUString QuoteStr( const OUString& rIn );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment