Kaydet (Commit) 5dd4a069 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

l10ntools: sal_Bool -> bool

Change-Id: Ifffdc0942b83b5761cbbbfc5db7d241be60815cb
üst a450e0ee
......@@ -103,7 +103,7 @@ protected:
CfgStack aStack;
CfgStackData *pStackData;
sal_Bool bLocalize;
bool bLocalize;
virtual void WorkOnText(
OString &rText,
......@@ -122,7 +122,7 @@ private:
const OString &rIsoLang,
const OString &rResTyp );
sal_Bool IsTokenClosed(const OString &rToken);
bool IsTokenClosed(const OString &rToken);
public:
CfgParser();
......@@ -163,7 +163,7 @@ private:
ResData *pResData;
OString sFilename;
sal_Bool bEnglish;
bool bEnglish;
std::ofstream pOutputStream;
......
......@@ -71,15 +71,15 @@ class ResData
public:
ResData( const OString &rGId );
ResData( const OString &rGId , const OString &rFilename );
sal_Bool SetId(const OString &rId, sal_uInt16 nLevel);
bool SetId(const OString &rId, sal_uInt16 nLevel);
sal_uInt16 nIdLevel;
sal_Bool bChild;
sal_Bool bChildWithText;
bool bChild;
bool bChildWithText;
sal_Bool bText;
sal_Bool bQuickHelpText;
sal_Bool bTitle;
bool bText;
bool bQuickHelpText;
bool bTitle;
OString sResTyp;
OString sId;
......@@ -130,23 +130,23 @@ private:
ResStack aResStack; ///< stack for parsing recursive
sal_Bool bDefine; // cur. res. in a define?
sal_Bool bNextMustBeDefineEOL; ///< define but no \ at lineend
bool bDefine; // cur. res. in a define?
bool bNextMustBeDefineEOL; ///< define but no \ at lineend
std::size_t nLevel; // res. recursiv? how deep?
sal_uInt16 nList; ///< cur. res. is List
std::size_t nListIndex;
std::size_t nListLevel;
sal_Bool bMergeMode;
bool bMergeMode;
OString sMergeSrc;
sal_Bool bError; // any errors while export?
sal_Bool bReadOver;
bool bError; // any errors while export?
bool bReadOver;
OString sFilename;
OString sLanguages;
std::vector<OString> aLanguages;
sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False ); ///< called befor dest. cur ResData
sal_Bool WriteExportList( ResData *pResData, ExportList& rExportList, const sal_uInt16 nTyp );
bool WriteData( ResData *pResData, bool bCreateNew = false ); ///< called befor dest. cur ResData
bool WriteExportList( ResData *pResData, ExportList& rExportList, const sal_uInt16 nTyp );
OString MergePairedList( OString const & sLine , OString const & sText );
......@@ -179,8 +179,8 @@ public:
void Init();
int Execute( int nToken, const char * pToken ); ///< called from lexer
void SetError() { bError = sal_True; }
sal_Bool GetError() { return bError; }
void SetError() { bError = true; }
bool GetError() { return bError; }
ParserQueue* pParseQueue; // public!!
};
......@@ -214,7 +214,7 @@ public:
sTitle[ rId ] = rTitle;
bTitleFirst[ rId ] = true;
}
bool GetText( OString &rReturn, sal_uInt16 nTyp, const OString &nLangIndex, sal_Bool bDel = sal_False );
bool GetText( OString &rReturn, sal_uInt16 nTyp, const OString &nLangIndex, bool bDel = false );
/**
Generate QTZ string with ResData
......@@ -293,7 +293,7 @@ public:
~MergeData();
MergeEntrys* GetMergeEntries();
sal_Bool operator==( ResData *pData );
bool operator==( ResData *pData );
};
//
......
......@@ -46,7 +46,7 @@ private:
sal_uInt16 nError;
LngLineList *pLines;
OString sSource;
sal_Bool bULF;
bool bULF;
std::vector<OString> aLanguages;
bool isNextGroup(OString &sGroup_out, const OString &sLine_in);
......@@ -56,11 +56,11 @@ private:
const OString &rActFileName, const OString &rID);
public:
LngParser(const OString &rLngFile,
sal_Bool bULFFormat);
bool bULFFormat);
~LngParser();
sal_Bool CreatePO( const OString &rPOFile );
sal_Bool Merge(const OString &rPOFile, const OString &rDestinationFile,
bool CreatePO( const OString &rPOFile );
bool Merge(const OString &rPOFile, const OString &rDestinationFile,
const OString &rLanguage );
};
......
......@@ -160,7 +160,7 @@ public:
XMLHashMap* GetStrings(){ return m_pXMLStrings; }
void Write( OString const &rFilename );
sal_Bool Write( std::ofstream &rStream, XMLNode *pCur = NULL );
bool Write( std::ofstream &rStream, XMLNode *pCur = NULL );
bool CheckExportStatus( XMLParentNode *pCur = NULL );
......
......@@ -32,8 +32,8 @@ private:
OString sGID;
OString sLID;
sal_Bool bError;
sal_Bool bText;
bool bError;
bool bText;
OString sCurrentOpenTag;
OString sCurrentCloseTag;
......@@ -65,8 +65,8 @@ public:
int Execute( int nToken, char * pToken );
void SetError( sal_Bool bErr = sal_True ) { bError = bErr; }
sal_Bool GetError() { return bError; }
void SetError( bool bErr = true ) { bError = bErr; }
bool GetError() { return bError; }
};
......
......@@ -133,7 +133,7 @@ CfgStackData *CfgStack::GetStackData()
CfgParser::CfgParser()
: pStackData( NULL ),
bLocalize( sal_False )
bLocalize( false )
{
}
......@@ -141,7 +141,7 @@ CfgParser::~CfgParser()
{
}
sal_Bool CfgParser::IsTokenClosed(const OString &rToken)
bool CfgParser::IsTokenClosed(const OString &rToken)
{
return rToken[rToken.getLength() - 2] == '/';
}
......@@ -169,7 +169,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
OString sTokenName;
OString sTokenId;
sal_Bool bOutput = sal_True;
bool bOutput = true;
switch ( nToken ) {
case CFG_TOKEN_PACKAGE:
......@@ -202,7 +202,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
break;
case CFG_TOKEN_OORNAME:
sSearch = "oor:name=";
bLocalize = sal_True;
bLocalize = true;
break;
case CFG_TOKEN_OORVALUE:
sSearch = "oor:value=";
......@@ -217,7 +217,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
sCurrentIsoLang = sTemp.getToken(1, '"');
if ( sCurrentIsoLang == NO_TRANSLATE_ISO )
bLocalize = sal_False;
bLocalize = false;
pStackData->sTextTag = sToken;
......@@ -272,11 +272,11 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
case CFG_TEXTCHAR:
sCurrentText += sToken;
bOutput = sal_False;
bOutput = false;
break;
case CFG_TOKEN_NO_TRANSLATE:
bLocalize = sal_False;
bLocalize = false;
break;
}
......@@ -399,7 +399,7 @@ CfgMerge::CfgMerge(
: pMergeDataFile( NULL ),
pResData( NULL ),
sFilename( rFilename ),
bEnglish( sal_False )
bEnglish( false )
{
pOutputStream.open(
rOutputFile.getStr(), std::ios_base::out | std::ios_base::trunc);
......@@ -451,7 +451,7 @@ void CfgMerge::WorkOnText(OString &, const OString& rLangIndex)
}
if (rLangIndex.equalsIgnoreAsciiCase("en-US"))
bEnglish = sal_True;
bEnglish = true;
}
}
......@@ -472,7 +472,7 @@ void CfgMerge::WorkOnResourceEnd()
sCur = aLanguages[ i ];
OString sContent;
pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , sal_True );
pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , true );
if (
( !sCur.equalsIgnoreAsciiCase("en-US") ) && !sContent.isEmpty())
{
......@@ -511,7 +511,7 @@ void CfgMerge::WorkOnResourceEnd()
}
delete pResData;
pResData = NULL;
bEnglish = sal_False;
bEnglish = false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
......@@ -48,7 +48,7 @@ static void lcl_RemoveUTF8ByteOrderMarker( OString &rString )
// class LngParser
//
LngParser::LngParser(const OString &rLngFile,
sal_Bool bULFFormat)
bool bULFFormat)
: nError( LNG_OK )
, pLines( NULL )
, sSource( rLngFile )
......@@ -89,7 +89,7 @@ LngParser::~LngParser()
delete pLines;
}
sal_Bool LngParser::CreatePO( const OString &rPOFile )
bool LngParser::CreatePO( const OString &rPOFile )
{
PoOfstream aPOStream( rPOFile, PoOfstream::APP );
if (!aPOStream.isOpen()) {
......@@ -97,7 +97,7 @@ sal_Bool LngParser::CreatePO( const OString &rPOFile )
}
size_t nPos = 0;
sal_Bool bStart = true;
bool bStart = true;
OString sGroup, sLine;
OStringHashMap Text;
OString sID;
......@@ -126,7 +126,7 @@ void LngParser::WritePO(PoOfstream &aPOStream,
const OString &rID)
{
sal_Bool bExport = true;
bool bExport = true;
if ( bExport )
{
common::writePoEntry(
......@@ -159,7 +159,7 @@ void LngParser::ReadLine(const OString &rLine_in,
}
}
sal_Bool LngParser::Merge(
bool LngParser::Merge(
const OString &rPOFile,
const OString &rDestinationFile,
const OString &rLanguage )
......@@ -176,7 +176,7 @@ sal_Bool LngParser::Merge(
aLanguages = aMergeDataFile.GetLanguages();
size_t nPos = 0;
sal_Bool bGroup = sal_False;
bool bGroup = false;
OString sGroup;
// seek to next group
......@@ -187,7 +187,7 @@ sal_Bool LngParser::Merge(
if ( sLine.startsWith("[") && sLine.endsWith("]") )
{
sGroup = getBracketedContent(sLine).trim();
bGroup = sal_True;
bGroup = true;
}
nPos ++;
}
......@@ -201,7 +201,7 @@ sal_Bool LngParser::Merge(
pResData->sResTyp = "LngText";
MergeEntrys *pEntrys = aMergeDataFile.GetMergeEntrys( pResData );
// read languages
bGroup = sal_False;
bGroup = false;
OString sLanguagesDone;
......@@ -212,7 +212,7 @@ sal_Bool LngParser::Merge(
if ( sLine.startsWith("[") && sLine.endsWith("]") )
{
sGroup = getBracketedContent(sLine).trim();
bGroup = sal_True;
bGroup = true;
nPos ++;
sLanguagesDone = "";
}
......@@ -242,7 +242,7 @@ sal_Bool LngParser::Merge(
if( !sLang.isEmpty() )
{
OString sNewText;
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True );
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, true );
if( sLang == "qtz" )
continue;
......@@ -280,7 +280,7 @@ sal_Bool LngParser::Merge(
{
OString sNewText;
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, sal_True );
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, true );
if( sCur == "qtz" )
continue;
if ( !sNewText.isEmpty() && sCur != "x-comment")
......@@ -314,7 +314,7 @@ sal_Bool LngParser::Merge(
aDestination << (*pLines)[i]->getStr() << '\n';
aDestination.close();
return sal_True;
return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -66,11 +66,11 @@ namespace
ResData::ResData( const OString &rGId )
:
nIdLevel( ID_LEVEL_NULL ),
bChild( sal_False ),
bChildWithText( sal_False ),
bText( sal_False ),
bQuickHelpText( sal_False ),
bTitle( sal_False ),
bChild( false ),
bChildWithText( false ),
bText( false ),
bQuickHelpText( false ),
bTitle( false ),
sGId( rGId ),
sTextTyp( "Text" )
{
......@@ -80,11 +80,11 @@ ResData::ResData( const OString &rGId )
ResData::ResData( const OString &rGId, const OString &rFilename)
:
nIdLevel( ID_LEVEL_NULL ),
bChild( sal_False ),
bChildWithText( sal_False ),
bText( sal_False ),
bQuickHelpText( sal_False ),
bTitle( sal_False ),
bChild( false ),
bChildWithText( false ),
bText( false ),
bQuickHelpText( false ),
bTitle( false ),
sGId( rGId ),
sFilename( rFilename ),
sTextTyp( "Text" )
......@@ -97,7 +97,7 @@ ResData::ResData( const OString &rGId, const OString &rFilename)
//
bool MergeEntrys::GetText( OString &rReturn,
sal_uInt16 nTyp, const OString &nLangIndex, sal_Bool bDel )
sal_uInt16 nTyp, const OString &nLangIndex, bool bDel )
{
bool bReturn = true;
switch ( nTyp ) {
......@@ -214,7 +214,7 @@ MergeEntrys* MergeData::GetMergeEntries()
return pMergeEntrys;
}
sal_Bool MergeData::operator==( ResData *pData )
bool MergeData::operator==( ResData *pData )
{
return pData->sId == sLID && pData->sGId == sGID
&& pData->sResTyp.equalsIgnoreAsciiCase(sTyp);
......
......@@ -172,7 +172,7 @@ void XMLFile::Write( OString const &aFilename )
s.close();
}
sal_Bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
{
if ( !pCur )
Write( rStream, this );
......@@ -237,7 +237,7 @@ sal_Bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
break;
}
}
return sal_True;
return true;
}
void XMLFile::Print( XMLNode *pCur, sal_uInt16 nLevel )
......
......@@ -40,8 +40,8 @@ void YYWarning( const char * );
// set of global variables
bool bMergeMode;
sal_Bool bDisplayName;
sal_Bool bExtensionDescription;
bool bDisplayName;
bool bExtensionDescription;
OString sLanguage;
OString sInputFileName;
OString sOutputFile;
......@@ -55,8 +55,8 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
{
bDisplayName = sal_False;
bExtensionDescription = sal_False;
bDisplayName = false;
bExtensionDescription = false;
common::HandledArgs aArgs;
if ( common::handleArguments(argc, argv, aArgs) )
......@@ -149,8 +149,8 @@ int GetError()
XRMResParser::XRMResParser()
: bError( sal_False ),
bText( sal_False )
: bError( false ),
bText( false )
{
}
......@@ -168,7 +168,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
if ( sNewGID != sGID ) {
sGID = sNewGID;
}
bText = sal_True;
bText = true;
sCurrentText = "";
sCurrentOpenTag = rToken;
Output( rToken );
......@@ -182,26 +182,26 @@ int XRMResParser::Execute( int nToken, char * pToken )
WorkOnText( sCurrentOpenTag, sCurrentText );
Output( sCurrentText );
EndOfText( sCurrentOpenTag, sCurrentCloseTag );
bText = sal_False;
bText = false;
rToken = OString("");
sCurrentText = OString("");
}
break;
case DESC_DISPLAY_NAME_START:{
bDisplayName = sal_True;
bDisplayName = true;
}
break;
case DESC_DISPLAY_NAME_END:{
bDisplayName = sal_False;
bDisplayName = false;
}
break;
case DESC_TEXT_START:{
if (bDisplayName) {
sGID = OString("dispname");
bText = sal_True;
bText = true;
sCurrentText = "";
sCurrentOpenTag = rToken;
Output( rToken );
......@@ -217,7 +217,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
WorkOnText( sCurrentOpenTag, sCurrentText );
Output( sCurrentText );
EndOfText( sCurrentOpenTag, sCurrentCloseTag );
bText = sal_False;
bText = false;
rToken = OString("");
sCurrentText = OString("");
}
......@@ -225,12 +225,12 @@ int XRMResParser::Execute( int nToken, char * pToken )
break;
case DESC_EXTENSION_DESCRIPTION_START: {
bExtensionDescription = sal_True;
bExtensionDescription = true;
}
break;
case DESC_EXTENSION_DESCRIPTION_END: {
bExtensionDescription = sal_False;
bExtensionDescription = false;
}
break;
......@@ -420,7 +420,7 @@ void XRMResMerge::WorkOnDesc(
OString sContent;
if ( !sCur.equalsIgnoreAsciiCase("en-US") &&
( pEntrys->GetText(
sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
sContent, STRING_TYP_TEXT, sCur, true )) &&
!sContent.isEmpty())
{
OString sText( sContent );
......@@ -509,7 +509,7 @@ void XRMResMerge::EndOfText(
OString sContent;
if (!sCur.equalsIgnoreAsciiCase("en-US") &&
( pEntrys->GetText(
sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
sContent, STRING_TYP_TEXT, sCur, true )) &&
!sContent.isEmpty() &&
helper::isWellFormedXML( sContent ))
{
......
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