summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/cfgmerge.hxx14
-rw-r--r--l10ntools/inc/export.hxx128
-rw-r--r--l10ntools/inc/gsicheck.hxx52
-rw-r--r--l10ntools/inc/l10ntools/vosapp.hxx10
-rw-r--r--l10ntools/inc/lngmerge.hxx12
-rw-r--r--l10ntools/inc/srciter.hxx2
-rw-r--r--l10ntools/inc/tagtest.hxx110
-rw-r--r--l10ntools/inc/wtranode.hxx4
-rw-r--r--l10ntools/inc/wtratree.hxx4
-rw-r--r--l10ntools/inc/xmlparse.hxx34
-rw-r--r--l10ntools/inc/xrmmerge.hxx8
-rw-r--r--l10ntools/layout/layoutparse.cxx6
-rw-r--r--l10ntools/layout/layoutparse.hxx2
-rw-r--r--l10ntools/layout/tralay.cxx8
-rw-r--r--l10ntools/source/cfgmerge.cxx80
-rw-r--r--l10ntools/source/directory.cxx6
-rw-r--r--l10ntools/source/export.cxx386
-rw-r--r--l10ntools/source/export2.cxx30
-rw-r--r--l10ntools/source/gsicheck.cxx252
-rw-r--r--l10ntools/source/gsiconv.cxx26
-rw-r--r--l10ntools/source/helpex.cxx48
-rw-r--r--l10ntools/source/helpmerge.cxx6
-rw-r--r--l10ntools/source/lngex.cxx48
-rw-r--r--l10ntools/source/lngmerge.cxx38
-rw-r--r--l10ntools/source/localize.cxx96
-rw-r--r--l10ntools/source/merge.cxx30
-rw-r--r--l10ntools/source/srciter.cxx16
-rw-r--r--l10ntools/source/tagtest.cxx242
-rw-r--r--l10ntools/source/wtranode.cxx4
-rw-r--r--l10ntools/source/wtratree.cxx12
-rw-r--r--l10ntools/source/xgfconv.cxx6
-rw-r--r--l10ntools/source/xmlparse.cxx106
-rw-r--r--l10ntools/source/xrmmerge.cxx50
33 files changed, 938 insertions, 938 deletions
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx
index ae0708f5ff05..e0c2c0cf61f2 100644
--- a/l10ntools/inc/cfgmerge.hxx
+++ b/l10ntools/inc/cfgmerge.hxx
@@ -76,13 +76,13 @@ public:
CfgStack() : CfgStackList( 10, 10 ) {}
~CfgStack();
- ULONG Push( CfgStackData *pStackData );
+ sal_uIntPtr Push( CfgStackData *pStackData );
CfgStackData *Push( const ByteString &rTag, const ByteString &rId );
CfgStackData *Pop() { return Remove( Count() - 1 ); }
- CfgStackData *GetStackData( ULONG nPos = LIST_APPEND );
+ CfgStackData *GetStackData( sal_uIntPtr nPos = LIST_APPEND );
- ByteString GetAccessPath( ULONG nPos = LIST_APPEND );
+ ByteString GetAccessPath( sal_uIntPtr nPos = LIST_APPEND );
};
//
@@ -101,7 +101,7 @@ protected:
CfgStack aStack;
CfgStackData *pStackData;
- BOOL bLocalize;
+ sal_Bool bLocalize;
virtual void WorkOnText(
ByteString &rText,
@@ -121,7 +121,7 @@ private:
const ByteString &rIsoLang,
const ByteString &rResTyp );
-BOOL IsTokenClosed( const ByteString &rToken );
+sal_Bool IsTokenClosed( const ByteString &rToken );
public:
CfgParser();
@@ -181,9 +181,9 @@ private:
std::vector<ByteString> aLanguages;
ResData *pResData;
- BOOL bGerman;
+ sal_Bool bGerman;
ByteString sFilename;
- BOOL bEnglish;
+ sal_Bool bEnglish;
protected:
void WorkOnText(
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index d1474503882f..8828594c54fd 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -61,7 +61,7 @@
struct eqstr{
- BOOL operator()(const char* s1, const char* s2) const{
+ sal_Bool operator()(const char* s1, const char* s2) const{
return strcmp(s1,s2)==0;
}
};
@@ -114,11 +114,11 @@ DECLARE_LIST( ExportListBase, ExportListEntry * )
class ExportList : public ExportListBase
{
private:
- ULONG nSourceLanguageListEntryCount;
+ sal_uIntPtr nSourceLanguageListEntryCount;
public:
ExportList() : ExportListBase() { nSourceLanguageListEntryCount = 0; }
- ULONG GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
+ sal_uIntPtr GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
void NewSourceLanguageListEntry() { nSourceLanguageListEntryCount++; }
};
@@ -144,21 +144,21 @@ class ResData
{
public:
~ResData();
- BOOL SetId( const ByteString &rId, USHORT nLevel );
+ sal_Bool SetId( const ByteString &rId, sal_uInt16 nLevel );
- USHORT nWidth;
- USHORT nChildIndex;
- USHORT nIdLevel;
- BOOL bChild;
- BOOL bChildWithText;
+ sal_uInt16 nWidth;
+ sal_uInt16 nChildIndex;
+ sal_uInt16 nIdLevel;
+ sal_Bool bChild;
+ sal_Bool bChildWithText;
- BOOL bText;
- BOOL bHelpText;
- BOOL bQuickHelpText;
- BOOL bTitle;
- BOOL bList;
+ sal_Bool bText;
+ sal_Bool bHelpText;
+ sal_Bool bQuickHelpText;
+ sal_Bool bTitle;
+ sal_Bool bList;
- BOOL bRestMerged;
+ sal_Bool bRestMerged;
ByteString sResTyp;
ByteString sId;
@@ -167,16 +167,16 @@ public:
ByteString sFilename;
ByteStringHashMap sText;
- USHORT nTextRefId;
+ sal_uInt16 nTextRefId;
ByteStringHashMap sHelpText;
- USHORT nHelpTextRefId;
+ sal_uInt16 nHelpTextRefId;
ByteStringHashMap sQuickHelpText;
- USHORT nQuickHelpTextRefId;
+ sal_uInt16 nQuickHelpTextRefId;
ByteStringHashMap sTitle;
- USHORT nTitleRefId;
+ sal_uInt16 nTitleRefId;
ByteString sTextTyp;
ByteStringHashMap aFallbackData;
@@ -201,14 +201,14 @@ public:
nWidth( 0 ),
nChildIndex( 0 ),
nIdLevel( ID_LEVEL_NULL ),
- bChild( FALSE ),
- bChildWithText( FALSE ),
- bText( FALSE ),
- bHelpText( FALSE ),
- bQuickHelpText( FALSE ),
- bTitle( FALSE ),
- bList( FALSE ),
- bRestMerged( FALSE ),
+ bChild( sal_False ),
+ bChildWithText( sal_False ),
+ bText( sal_False ),
+ bHelpText( sal_False ),
+ bQuickHelpText( sal_False ),
+ bTitle( sal_False ),
+ bList( sal_False ),
+ bRestMerged( sal_False ),
sGId( rGId ),
nTextRefId( REFID_NONE ),
nHelpTextRefId( REFID_NONE ),
@@ -229,14 +229,14 @@ public:
:
nChildIndex( 0 ),
nIdLevel( ID_LEVEL_NULL ),
- bChild( FALSE ),
- bChildWithText( FALSE ),
- bText( FALSE ),
- bHelpText( FALSE ),
- bQuickHelpText( FALSE ),
- bTitle( FALSE ),
- bList( FALSE ),
- bRestMerged( FALSE ),
+ bChild( sal_False ),
+ bChildWithText( sal_False ),
+ bText( sal_False ),
+ bHelpText( sal_False ),
+ bQuickHelpText( sal_False ),
+ bTitle( sal_False ),
+ bList( sal_False ),
+ bRestMerged( sal_False ),
sGId( rGId ),
sFilename( rFilename ),
nTextRefId( REFID_NONE ),
@@ -300,23 +300,23 @@ private:
ByteString sActPForm; // hold cur. system
- BOOL bDefine; // cur. res. in a define?
- BOOL bNextMustBeDefineEOL; // define but no \ at lineend
- ULONG nLevel; // res. recursiv? how deep?
- USHORT nList; // cur. res. is String- or FilterList
+ sal_Bool bDefine; // cur. res. in a define?
+ sal_Bool bNextMustBeDefineEOL; // define but no \ at lineend
+ sal_uIntPtr nLevel; // res. recursiv? how deep?
+ sal_uInt16 nList; // cur. res. is String- or FilterList
ByteString nListLang;
- ULONG nListIndex;
- ULONG nListLevel;
+ sal_uIntPtr nListIndex;
+ sal_uIntPtr nListLevel;
bool bSkipFile;
ByteString sProject;
ByteString sRoot;
- BOOL bEnableExport;
- BOOL bMergeMode;
+ sal_Bool bEnableExport;
+ sal_Bool bMergeMode;
ByteString sMergeSrc;
ByteString sLastListLine;
- BOOL bError; // any errors while export?
- BOOL bReadOver;
- BOOL bDontWriteOutput;
+ sal_Bool bError; // any errors while export?
+ sal_Bool bReadOver;
+ sal_Bool bDontWriteOutput;
ByteString sLastTextTyp;
static bool isInitialized;
ByteString sFilename;
@@ -339,7 +339,7 @@ public:
static bool hasUTF8ByteOrderMarker( const ByteString &rString );
static void RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename );
static bool fileHasUTF8ByteOrderMarker( const ByteString &rString );
- static ByteString GetIsoLangByIndex( USHORT nIndex );
+ static ByteString GetIsoLangByIndex( sal_uInt16 nIndex );
static void QuotHTML( ByteString &rString );
static bool CopyFile( const ByteString& source , const ByteString& dest );
@@ -364,7 +364,7 @@ public:
static void FillInFallbacks( ResData *pResData );
static void FillInListFallbacks( ExportList *pList, const ByteString &nSource, const ByteString &nFallback );
static ByteString GetTimeStamp();
- static BOOL ConvertLineEnds( ByteString sSource, ByteString sDestination );
+ static sal_Bool ConvertLineEnds( ByteString sSource, ByteString sDestination );
static ByteString GetNativeFile( ByteString sSource );
static DirEntry GetTempFile();
@@ -375,11 +375,11 @@ private:
static std::vector<ByteString> aLanguages;
static std::vector<ByteString> aForcedLanguages;
- BOOL ListExists( ResData *pResData, USHORT nLst );
+ sal_Bool ListExists( ResData *pResData, sal_uInt16 nLst );
- BOOL WriteData( ResData *pResData, BOOL bCreateNew = FALSE );// called befor dest. cur ResData
- BOOL WriteExportList( ResData *pResData, ExportList *pExportList,
- const ByteString &rTyp, BOOL bCreateNew = FALSE );
+ sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False );// called befor dest. cur ResData
+ sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList,
+ const ByteString &rTyp, sal_Bool bCreateNew = sal_False );
ByteString MergePairedList( ByteString& sLine , ByteString& sText );
@@ -396,10 +396,10 @@ private:
void CleanValue( ByteString &rValue );
ByteString GetText( const ByteString &rSource, int nToken );
- BOOL PrepareTextToMerge( ByteString &rText, USHORT nTyp,
+ sal_Bool PrepareTextToMerge( ByteString &rText, sal_uInt16 nTyp,
ByteString &nLangIndex, ResData *pResData );
- void MergeRest( ResData *pResData, USHORT nMode = MERGE_MODE_NORMAL );
+ void MergeRest( ResData *pResData, sal_uInt16 nMode = MERGE_MODE_NORMAL );
void ConvertMergeContent( ByteString &rText );
void WriteToMerged( const ByteString &rText , bool bSDFContent );
@@ -408,17 +408,17 @@ private:
void CutComment( ByteString &rText );
public:
- Export( const ByteString &rOutput, BOOL bWrite,
+ Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile );
- Export( const ByteString &rOutput, BOOL bWrite,
+ Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot,
const ByteString &rMergeSource , const ByteString& rFile );
~Export();
void Init();
int Execute( int nToken, const char * pToken ); // called from lexer
- void SetError() { bError = TRUE; }
- BOOL GetError() { return bError; }
+ void SetError() { bError = sal_True; }
+ sal_Bool GetError() { return bError; }
};
@@ -460,8 +460,8 @@ public:
sTitle[ nId ] = rTitle;
bTitleFirst[ nId ] = true;
}
- BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
- BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+ sal_Bool GetText( ByteString &rReturn, sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel = sal_False );
+ sal_Bool GetTransex3Text( ByteString &rReturn, sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel = sal_False );
};
@@ -495,7 +495,7 @@ public:
PFormEntrys* GetPFObject( const ByteString& rPFO );
ByteString Dump();
- BOOL operator==( ResData *pData );
+ sal_Bool operator==( ResData *pData );
};
//
@@ -509,7 +509,7 @@ public:
class MergeDataFile
{
private:
- BOOL bErrorLog;
+ sal_Bool bErrorLog;
ByteString sErrorLog;
SvFileStream aErrLog;
ByteStringSet aLanguageSet;
@@ -520,7 +520,7 @@ private:
public:
- MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
+ MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
~MergeDataFile();
@@ -536,7 +536,7 @@ public:
const ByteString &rQHTEXT, const ByteString &rTITLE ,
const ByteString &sFilename , bool bCaseSensitive
);
- static USHORT GetLangIndex( USHORT nId );
+ static sal_uInt16 GetLangIndex( sal_uInt16 nId );
static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false );
ByteString Dump();
diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx
index fb1eecd38c82..49a1f861eed0 100644
--- a/l10ntools/inc/gsicheck.hxx
+++ b/l10ntools/inc/gsicheck.hxx
@@ -41,7 +41,7 @@ private:
ParserMessageList aMessages;
LineFormat aFormat;
- ULONG nLineNumber;
+ sal_uIntPtr nLineNumber;
ByteString aUniqId;
ByteString aLineType;
@@ -50,15 +50,15 @@ private:
ByteString aQuickHelpText;
ByteString aTitle;
- BOOL bOK;
- BOOL bFixed;
+ sal_Bool bOK;
+ sal_Bool bFixed;
void ReassembleLine();
public:
- GSILine( const ByteString &rLine, ULONG nLine );
+ GSILine( const ByteString &rLine, sal_uIntPtr nLine );
LineFormat GetLineFormat() const { return aFormat; }
- ULONG GetLineNumber() const { return nLineNumber; }
+ sal_uIntPtr GetLineNumber() const { return nLineNumber; }
ByteString const GetUniqId() const { return aUniqId; }
ByteString const GetLineType() const { return aLineType; }
@@ -74,13 +74,13 @@ public:
void SetTitle( ByteString &aNew ) { aTitle = aNew; ReassembleLine(); }
ParserMessageList* GetMessageList() { return &aMessages; };
- BOOL HasMessages(){ return ( aMessages.Count() > 0 ); };
+ sal_Bool HasMessages(){ return ( aMessages.Count() > 0 ); };
- BOOL IsOK() const { return bOK; }
+ sal_Bool IsOK() const { return bOK; }
void NotOK();
- BOOL IsFixed() const { return bFixed; }
- void SetFixed() { bFixed = TRUE; };
+ sal_Bool IsFixed() const { return bFixed; }
+ void SetFixed() { bFixed = sal_True; };
};
//
@@ -97,31 +97,31 @@ private:
GSILine *pSourceLine;
GSILine *pReferenceLine;
void PrintList( ParserMessageList *pList, ByteString aPrefix, GSILine *pLine );
- BOOL bPrintContext;
- BOOL bCheckSourceLang;
- BOOL bCheckTranslationLang;
- BOOL bReference;
- BOOL bAllowKeyIDs;
- BOOL bAllowSuspicious;
+ sal_Bool bPrintContext;
+ sal_Bool bCheckSourceLang;
+ sal_Bool bCheckTranslationLang;
+ sal_Bool bReference;
+ sal_Bool bAllowKeyIDs;
+ sal_Bool bAllowSuspicious;
- BOOL bHasBlockError;
+ sal_Bool bHasBlockError;
- BOOL IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorPos, ByteString &aErrorMsg, BOOL &bHasBeenFixed, ByteString &aFixed ) const;
- BOOL TestUTF8( GSILine* pTestee, BOOL bFixTags );
- BOOL HasSuspiciousChars( GSILine* pTestee, GSILine* pSource );
+ sal_Bool IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const;
+ sal_Bool TestUTF8( GSILine* pTestee, sal_Bool bFixTags );
+ sal_Bool HasSuspiciousChars( GSILine* pTestee, GSILine* pSource );
public:
- GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, BOOL bAllowKID, BOOL bAllowSusp );
+ GSIBlock( sal_Bool PbPrintContext, sal_Bool bSource, sal_Bool bTrans, sal_Bool bRef, sal_Bool bAllowKID, sal_Bool bAllowSusp );
~GSIBlock();
- void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, ByteString aContext, ULONG nLine, ByteString aUniqueId = ByteString() );
- void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, ULONG nLine, ByteString aUniqueId = ByteString() );
+ void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uIntPtr nLine, ByteString aUniqueId = ByteString() );
+ void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uIntPtr nLine, ByteString aUniqueId = ByteString() );
void InsertLine( GSILine* pLine, const ByteString aSourceLang);
void SetReferenceLine( GSILine* pLine );
- BOOL CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags );
+ sal_Bool CheckSyntax( sal_uIntPtr nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags );
- void WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine );
- void WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine );
- void WriteFixed( LazySvFileStream &aFixOut, BOOL bRequireSourceLine );
+ void WriteError( LazySvFileStream &aErrOut, sal_Bool bRequireSourceLine );
+ void WriteCorrect( LazySvFileStream &aOkOut, sal_Bool bRequireSourceLine );
+ void WriteFixed( LazySvFileStream &aFixOut, sal_Bool bRequireSourceLine );
};
#endif
diff --git a/l10ntools/inc/l10ntools/vosapp.hxx b/l10ntools/inc/l10ntools/vosapp.hxx
index 49e10e15e3d4..ccfe07006f76 100644
--- a/l10ntools/inc/l10ntools/vosapp.hxx
+++ b/l10ntools/inc/l10ntools/vosapp.hxx
@@ -10,19 +10,19 @@
class Application
{
public:
- USHORT GetCommandLineParamCount();
- XubString GetCommandLineParam( USHORT nParam );
+ sal_uInt16 GetCommandLineParamCount();
+ XubString GetCommandLineParam( sal_uInt16 nParam );
virtual void Main() = 0;
};
// Urg: Cut & Paste from svapp.cxx: we don't want to depend on vcl
-USHORT Application::GetCommandLineParamCount()
+sal_uInt16 Application::GetCommandLineParamCount()
{
vos::OStartupInfo aStartInfo;
- return (USHORT)aStartInfo.getCommandArgCount();
+ return (sal_uInt16)aStartInfo.getCommandArgCount();
}
-XubString Application::GetCommandLineParam( USHORT nParam )
+XubString Application::GetCommandLineParam( sal_uInt16 nParam )
{
vos::OStartupInfo aStartInfo;
rtl::OUString aParam;
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 923da89988b6..ba8577c0fc04 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -43,11 +43,11 @@ DECLARE_LIST( LngLineList, ByteString * )
class LngParser
{
private:
- USHORT nError;
+ sal_uInt16 nError;
LngLineList *pLines;
ByteString sSource;
- BOOL bDBIsUTF8;
- BOOL bULF;
+ sal_Bool bDBIsUTF8;
+ sal_Bool bULF;
bool bQuiet;
std::vector<ByteString> aLanguages;
@@ -58,9 +58,9 @@ private:
const ByteString &rPrj ,
const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
public:
- LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat, bool bQuiet_in );
+ LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat, bool bQuiet_in );
~LngParser();
- BOOL CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
- BOOL Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj );
+ sal_Bool CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
+ sal_Bool Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj );
};
diff --git a/l10ntools/inc/srciter.hxx b/l10ntools/inc/srciter.hxx
index 36061346fe16..91e2c20a768a 100644
--- a/l10ntools/inc/srciter.hxx
+++ b/l10ntools/inc/srciter.hxx
@@ -49,7 +49,7 @@ public:
SourceTreeIterator( const ByteString &rRootDirectory, const ByteString &rVersion , bool bLocal_in = false);
virtual ~SourceTreeIterator();
- BOOL StartExecute();
+ sal_Bool StartExecute();
void EndExecute();
virtual void OnExecuteDirectory( const rtl::OUString &rDirectory );
diff --git a/l10ntools/inc/tagtest.hxx b/l10ntools/inc/tagtest.hxx
index 3e9b03916f4f..90b19037e6e9 100644
--- a/l10ntools/inc/tagtest.hxx
+++ b/l10ntools/inc/tagtest.hxx
@@ -34,9 +34,9 @@
class GSILine;
-typedef USHORT TokenId;
+typedef sal_uInt16 TokenId;
-#define TOK_INVALIDPOS USHORT( 0xFFFF )
+#define TOK_INVALIDPOS sal_uInt16( 0xFFFF )
class ParserMessage;
@@ -74,24 +74,24 @@ private:
String aTagName;
StringHashMap aProperties;
- BOOL bClosed; // tag is closed <sdnf/>
- BOOL bCloseTag; // tag is close Tag </sdnf>
+ sal_Bool bClosed; // tag is closed <sdnf/>
+ sal_Bool bCloseTag; // tag is close Tag </sdnf>
- BOOL bIsBroken;
- BOOL bHasBeenFixed;
- BOOL bDone;
+ sal_Bool bIsBroken;
+ sal_Bool bHasBeenFixed;
+ sal_Bool bDone;
public:
String aTokenString;
TokenId nId;
- USHORT nPos; // Position in String
+ sal_uInt16 nPos; // Position in String
- TokenInfo():bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),nId( 0 ){;}
-explicit TokenInfo( TokenId pnId, USHORT nP ):bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),nId( pnId ),nPos(nP){;}
-explicit TokenInfo( TokenId pnId, USHORT nP, String paStr ):bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),aTokenString( paStr ),nId( pnId ),nPos(nP) {;}
-explicit TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList &rErrorList );
+ TokenInfo():bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),nId( 0 ){;}
+explicit TokenInfo( TokenId pnId, sal_uInt16 nP ):bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),nId( pnId ),nPos(nP){;}
+explicit TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr ):bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),aTokenString( paStr ),nId( pnId ),nPos(nP) {;}
+explicit TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr, ParserMessageList &rErrorList );
String GetTagName() const;
@@ -100,35 +100,35 @@ explicit TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList
/**
Is the property to be ignored or does it have the default value anyways
**/
- BOOL IsPropertyRelevant( const ByteString &aName, const String &aValue ) const;
- BOOL IsPropertyValueValid( const ByteString &aName, const String &aValue ) const;
+ sal_Bool IsPropertyRelevant( const ByteString &aName, const String &aValue ) const;
+ sal_Bool IsPropertyValueValid( const ByteString &aName, const String &aValue ) const;
/**
Does the property contain the same value for all languages
e.g.: the href in a link tag
**/
- BOOL IsPropertyInvariant( const ByteString &aName, const String &aValue ) const;
+ sal_Bool IsPropertyInvariant( const ByteString &aName, const String &aValue ) const;
/**
a subset of IsPropertyInvariant but containing only those that are fixable
we dont wat to fix e.g.: ahelp :: visibility
**/
- BOOL IsPropertyFixable( const ByteString &aName ) const;
- BOOL MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMessageList &rErrorList, BOOL bFixTags = FALSE ) const;
+ sal_Bool IsPropertyFixable( const ByteString &aName ) const;
+ sal_Bool MatchesTranslation( TokenInfo& rInfo, sal_Bool bGenErrors, ParserMessageList &rErrorList, sal_Bool bFixTags = sal_False ) const;
- BOOL IsDone() const { return bDone; }
- void SetDone( BOOL bNew = TRUE ) { bDone = bNew; }
+ sal_Bool IsDone() const { return bDone; }
+ void SetDone( sal_Bool bNew = sal_True ) { bDone = bNew; }
- BOOL HasBeenFixed() const { return bHasBeenFixed; }
- void SetHasBeenFixed( BOOL bNew = TRUE ) { bHasBeenFixed = bNew; }
+ sal_Bool HasBeenFixed() const { return bHasBeenFixed; }
+ void SetHasBeenFixed( sal_Bool bNew = sal_True ) { bHasBeenFixed = bNew; }
};
class ParserMessageList : public Impl_ParserMessageList
{
public:
- void AddError( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
- void AddWarning( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
+ void AddError( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
+ void AddWarning( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
- BOOL HasErrors();
+ sal_Bool HasErrors();
};
@@ -235,13 +235,13 @@ public:
void Clear()
{
- for ( ULONG i = 0 ; i < Count() ; i++ )
+ for ( sal_uIntPtr i = 0 ; i < Count() ; i++ )
delete TokenListImpl::GetObject( i );
TokenListImpl::Clear();
}
- void Insert( TokenInfo p, ULONG nIndex = LIST_APPEND )
+ void Insert( TokenInfo p, sal_uIntPtr nIndex = LIST_APPEND )
{ TokenListImpl::Insert( new TokenInfo(p), nIndex ); }
-/* TokenInfo Remove( ULONG nIndex )
+/* TokenInfo Remove( sal_uIntPtr nIndex )
{
TokenInfo aT = GetObject( nIndex );
delete TokenListImpl::GetObject( nIndex );
@@ -250,16 +250,16 @@ public:
}*/
// TokenInfo Remove( TokenInfo p ){ return Remove( GetPos( p ) ); }
// TokenInfo GetCurObject() const { return *TokenListImpl::GetCurObject(); }
- TokenInfo& GetObject( ULONG nIndex ) const
+ TokenInfo& GetObject( sal_uIntPtr nIndex ) const
{
// if ( TokenListImpl::GetObject(nIndex) )
return *TokenListImpl::GetObject(nIndex);
// else
// return TokenInfo();
}
-/* ULONG GetPos( const TokenInfo p ) const
+/* sal_uIntPtr GetPos( const TokenInfo p ) const
{
- for ( ULONG i = 0 ; i < Count() ; i++ )
+ for ( sal_uIntPtr i = 0 ; i < Count() ; i++ )
if ( p == GetObject( i ) )
return i;
return LIST_ENTRY_NOTFOUND;
@@ -267,7 +267,7 @@ public:
TokenList( const TokenList& rList );
/* {
- for ( ULONG i = 0 ; i < rList.Count() ; i++ )
+ for ( sal_uIntPtr i = 0 ; i < rList.Count() ; i++ )
{
Insert( rList.GetObject( i ), LIST_APPEND );
}
@@ -276,54 +276,54 @@ public:
class ParserMessage
{
- USHORT nErrorNr;
+ sal_uInt16 nErrorNr;
ByteString aErrorText;
- USHORT nTagBegin,nTagLength;
+ sal_uInt16 nTagBegin,nTagLength;
protected:
- ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
+ ParserMessage( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
public:
- USHORT GetErrorNr() { return nErrorNr; }
+ sal_uInt16 GetErrorNr() { return nErrorNr; }
ByteString GetErrorText() { return aErrorText; }
- USHORT GetTagBegin() { return nTagBegin; }
- USHORT GetTagLength() { return nTagLength; }
+ sal_uInt16 GetTagBegin() { return nTagBegin; }
+ sal_uInt16 GetTagLength() { return nTagLength; }
virtual ~ParserMessage() {}
- virtual BOOL IsError() =0;
+ virtual sal_Bool IsError() =0;
virtual ByteString Prefix() =0;
};
class ParserError : public ParserMessage
{
public:
- ParserError( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
+ ParserError( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
- virtual BOOL IsError() {return TRUE;};
+ virtual sal_Bool IsError() {return sal_True;};
virtual ByteString Prefix() {return "Error:"; };
};
class ParserWarning : public ParserMessage
{
public:
- ParserWarning( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
+ ParserWarning( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
- virtual BOOL IsError() {return FALSE;};
+ virtual sal_Bool IsError() {return sal_False;};
virtual ByteString Prefix() {return "Warning:"; };
};
class SimpleParser
{
private:
- USHORT nPos;
+ sal_uInt16 nPos;
String aSource;
String aLastToken;
TokenList aTokenList;
TokenInfo aNextTag; // to store closetag in case of combined tags like <br/>
- String GetNextTokenString( ParserMessageList &rErrorList, USHORT &rTokeStartPos );
+ String GetNextTokenString( ParserMessageList &rErrorList, sal_uInt16 &rTokeStartPos );
public:
SimpleParser();
@@ -335,9 +335,9 @@ public:
class TokenParser
{
- BOOL match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken );
- BOOL match( const TokenInfo &aCurrentToken, const TokenInfo &aExpectedToken );
- void ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo &rTag );
+ sal_Bool match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken );
+ sal_Bool match( const TokenInfo &aCurrentToken, const TokenInfo &aExpectedToken );
+ void ParseError( sal_uInt16 nErrNr, ByteString aErrMsg, const TokenInfo &rTag );
void Paragraph();
void PfCase();
void PfCaseBegin();
@@ -353,7 +353,7 @@ class TokenParser
TokenId nPfCaseOptions;
TokenId nAppCaseOptions;
- BOOL bPfCaseActive ,bAppCaseActive;
+ sal_Bool bPfCaseActive ,bAppCaseActive;
TokenId nActiveRefTypes;
@@ -363,7 +363,7 @@ public:
TokenParser();
void Parse( const String &aCode, ParserMessageList* pList );
// ParserMessageList& GetErrors(){ return aErrorList; }
-// BOOL HasErrors(){ return ( aErrorList.Count() > 0 ); }
+// sal_Bool HasErrors(){ return ( aErrorList.Count() > 0 ); }
TokenList& GetTokenList(){ return aParser.GetTokenList(); }
};
@@ -373,21 +373,21 @@ private:
TokenParser aReferenceParser;
TokenParser aTesteeParser;
ParserMessageList aCompareWarningList;
- void CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTags );
- BOOL IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens );
+ void CheckTags( TokenList &aReference, TokenList &aTestee, sal_Bool bFixTags );
+ sal_Bool IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens );
String aFixedTestee;
public:
void CheckReference( GSILine *aReference );
- void CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags );
+ void CheckTestee( GSILine *aTestee, sal_Bool bHasSourceLine, sal_Bool bFixTags );
// ParserMessageList& GetReferenceErrors(){ return aReferenceParser.GetErrors(); }
-// BOOL HasReferenceErrors(){ return aReferenceParser.HasErrors(); }
+// sal_Bool HasReferenceErrors(){ return aReferenceParser.HasErrors(); }
// ParserMessageList& GetTesteeErrors(){ return aTesteeParser.GetErrors(); }
-// BOOL HasTesteeErrors(){ return aTesteeParser.HasErrors(); }
+// sal_Bool HasTesteeErrors(){ return aTesteeParser.HasErrors(); }
ParserMessageList& GetCompareWarnings(){ return aCompareWarningList; }
- BOOL HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); }
+ sal_Bool HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); }
String GetFixedTestee(){ return aFixedTestee; }
};
diff --git a/l10ntools/inc/wtranode.hxx b/l10ntools/inc/wtranode.hxx
index af01a4b29d5c..99afe462a9ab 100644
--- a/l10ntools/inc/wtranode.hxx
+++ b/l10ntools/inc/wtranode.hxx
@@ -80,7 +80,7 @@ class WTT_Node // WordTransTree-Node
// INQUIRY
E_TokenType TokenType() const;
UINT8 Value() const;
- BOOL IsOnDeleting() const;
+ sal_Bool IsOnDeleting() const;
const ByteString & ReplaceString() const;
private:
@@ -102,7 +102,7 @@ WTT_Node::TokenType() const
inline UINT8
WTT_Node::Value() const
{ return nValue; }
-inline BOOL
+inline sal_Bool
WTT_Node::IsOnDeleting() const
{ return bIsOnDeleting; }
inline const ByteString &
diff --git a/l10ntools/inc/wtratree.hxx b/l10ntools/inc/wtratree.hxx
index 6fd33a7cb413..5ed45d350348 100644
--- a/l10ntools/inc/wtratree.hxx
+++ b/l10ntools/inc/wtratree.hxx
@@ -81,7 +81,7 @@ class WordTransTree
E_Result TransformNextToken();
// INQUIRY
- BOOL TextEndReached() const;
+ sal_Bool TextEndReached() const;
const char * Output() const;
// These 3 functions are valid between two calls of
@@ -132,7 +132,7 @@ class WordTransTree
-inline BOOL
+inline sal_Bool
WordTransTree::TextEndReached() const
{ return pInputPosition == pInputEnd; }
inline const char *
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 69e74a83ec47..cb72ca532afe 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -87,7 +87,7 @@ public:
void setValue(const String &rValue){sValue=rValue;}
/// returns true if two attributes are equal and have the same value
- BOOL IsEqual(
+ sal_Bool IsEqual(
const XMLAttribute &rAttribute // the attribute which has to be equal
)
{
@@ -107,7 +107,7 @@ protected:
XMLNode() {}
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
virtual ~XMLNode() {}
};
@@ -126,7 +126,7 @@ protected:
XMLChildNode( const XMLChildNode& obj);
XMLChildNode& operator=(const XMLChildNode& obj);
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
/// returns the parent of this node
XMLParentNode *GetParent() { return pParent; }
@@ -162,7 +162,7 @@ protected:
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
/// returns child list of this node
XMLChildNodeList *GetChildList() { return pChildList; }
@@ -201,7 +201,7 @@ typedef std::hash_map<ByteString , LangHashMap* ,
typedef std::hash_map<ByteString, int, hashByteString,equalByteString> HashMap;
/// Mapping XML tag names <-> have localizable strings
-typedef std::hash_map<ByteString , BOOL ,
+typedef std::hash_map<ByteString , sal_Bool ,
hashByteString,equalByteString> TagMap;
/** Holds information of a XML file, is root node of tree
@@ -219,7 +219,7 @@ public:
~XMLFile();
ByteString* GetGroupID(std::deque<ByteString> &groupid);
- void Print( XMLNode *pCur = NULL, USHORT nLevel = 0 );
+ void Print( XMLNode *pCur = NULL, sal_uInt16 nLevel = 0 );
virtual void SearchL10NElements( XMLParentNode *pCur, int pos = 0 );
void Extract( XMLFile *pCur = NULL );
void View();
@@ -227,14 +227,14 @@ public:
void showType(XMLParentNode* node);
XMLHashMap* GetStrings(){return XMLStrings;}
- BOOL Write( ByteString &rFilename );
- BOOL Write( ofstream &rStream , XMLNode *pCur = NULL );
+ sal_Bool Write( ByteString &rFilename );
+ sal_Bool Write( ofstream &rStream , XMLNode *pCur = NULL );
bool CheckExportStatus( XMLParentNode *pCur = NULL );// , int pos = 0 );
XMLFile& operator=(const XMLFile& obj);
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns file name
const String &GetName() { return sFileName; }
@@ -275,10 +275,10 @@ public:
static void UnQuotHTML ( String &rString );
/// Return the numeric iso language code
- //USHORT GetLangByIsoLang( const ByteString &rIsoLang );
+ //sal_uInt16 GetLangByIsoLang( const ByteString &rIsoLang );
/// Return the alpha strings representation
- ByteString GetIsoLangByIndex( USHORT nIndex );
+ ByteString GetIsoLangByIndex( sal_uInt16 nIndex );
static XMLUtil& Instance();
~XMLUtil();
@@ -344,7 +344,7 @@ public:
XMLElement& operator=(const XMLElement& obj);
/// returns node type XML_NODE_ELEMENT
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns element name
const String &GetName() { return sElementName; }
@@ -414,7 +414,7 @@ public:
XMLData(const XMLData& obj);
XMLData& operator=(const XMLData& obj);
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns the data
const String &GetData() { return sData; }
@@ -446,7 +446,7 @@ public:
)
: XMLChildNode( Parent ), sComment( rComment ) {}
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
XMLComment( const XMLComment& obj );
@@ -478,7 +478,7 @@ public:
XMLDefault& operator=(const XMLDefault& obj);
/// returns node type XML_NODE_TYPE_COMMENT
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns the comment
const String &GetDefault() { return sDefault; }
@@ -490,8 +490,8 @@ public:
*/
struct XMLError {
XML_Error eCode; // the error code
- ULONG nLine; // error line number
- ULONG nColumn; // error column number
+ sal_uIntPtr nLine; // error line number
+ sal_uIntPtr nColumn; // error column number
String sMessage; // readable error message
};
diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx
index e8c3d322c92b..91981aa41619 100644
--- a/l10ntools/inc/xrmmerge.hxx
+++ b/l10ntools/inc/xrmmerge.hxx
@@ -38,8 +38,8 @@ private:
ByteString sGID;
ByteString sLID;
- BOOL bError;
- BOOL bText;
+ sal_Bool bError;
+ sal_Bool bText;
bool sLocalized;
@@ -74,8 +74,8 @@ public:
int Execute( int nToken, char * pToken );
- void SetError( BOOL bErr = TRUE ) { bError = bErr; }
- BOOL GetError() { return bError; }
+ void SetError( sal_Bool bErr = sal_True ) { bError = bErr; }
+ sal_Bool GetError() { return bError; }
};
//
diff --git a/l10ntools/layout/layoutparse.cxx b/l10ntools/layout/layoutparse.cxx
index 6bb839a9409e..692571b1166d 100644
--- a/l10ntools/layout/layoutparse.cxx
+++ b/l10ntools/layout/layoutparse.cxx
@@ -44,7 +44,7 @@ LayoutXMLFile::SearchL10NElements( XMLParentNode* pCur, int )
/* Recurse int children, SearchL10NElements does not do that for us. */
if ( XMLChildNodeList* lst = pCur->GetChildList() )
- for ( ULONG i = 0; i < lst->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < lst->Count(); i++ )
if ( lst->GetObject( i )->GetNodeType() == XML_NODE_TYPE_ELEMENT )
HandleElement( ( XMLElement* )lst->GetObject( i ) );
else if ( lst->GetObject( i )->GetNodeType() == XML_NODE_TYPE_COMMENT )
@@ -56,7 +56,7 @@ interestingAttributes( XMLAttributeList* lst )
{
std::vector<XMLAttribute*> interesting;
if ( lst )
- for ( ULONG i = 0; i < lst->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < lst->Count(); i++ )
if ( lst->GetObject( i )->Equals( STRING( "id" ) ) )
interesting.insert( interesting.begin(), lst->GetObject( i ) );
else if ( ! BSTRING( *lst->GetObject( i ) ).CompareTo( "_", 1 ) )
@@ -116,7 +116,7 @@ void LayoutXMLFile::InsertL10NElement( ByteString const& id, XMLElement* element
(*languageMap)[ language ] = element;
}
-BOOL LayoutXMLFile::Write( ByteString &aFilename )
+sal_Bool LayoutXMLFile::Write( ByteString &aFilename )
{
if ( aFilename.Len() )
diff --git a/l10ntools/layout/layoutparse.hxx b/l10ntools/layout/layoutparse.hxx
index cd24f091d318..2cf560b96893 100644
--- a/l10ntools/layout/layoutparse.hxx
+++ b/l10ntools/layout/layoutparse.hxx
@@ -38,7 +38,7 @@ public:
LayoutXMLFile( bool mergeMode );
void SearchL10NElements( XMLParentNode *pCur, int pos = 0 );
- BOOL Write( ByteString &aFilename );
+ sal_Bool Write( ByteString &aFilename );
void HandleElement( XMLElement* element );
void InsertL10NElement( ByteString const& id, XMLElement* element );
diff --git a/l10ntools/layout/tralay.cxx b/l10ntools/layout/tralay.cxx
index 72fd1a1d8c5e..906173998b1c 100644
--- a/l10ntools/layout/tralay.cxx
+++ b/l10ntools/layout/tralay.cxx
@@ -111,7 +111,7 @@ static ByteString ConvertSystemPath( const ByteString& rPath )
ByteString TranslateLayout::GetCommandLineParam( int i )
{
- return ByteString( OUSTRING_CSTR( Application::GetCommandLineParam( sal::static_int_cast< USHORT >( i ) ) ) );
+ return ByteString( OUSTRING_CSTR( Application::GetCommandLineParam( sal::static_int_cast< sal_uInt16 >( i ) ) ) );
}
ByteString TranslateLayout::GetOptionArgument( int const i )
@@ -163,7 +163,7 @@ void TranslateLayout::ParseCommandLine()
static XMLAttribute*
findAttribute( XMLAttributeList* lst, String const& name )
{
- for ( ULONG i = 0; i < lst->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < lst->Count(); i++ )
if ( lst->GetObject( i )->Equals( name ) )
return lst->GetObject( i );
return 0;
@@ -243,7 +243,7 @@ static void insertMarker( XMLParentNode *p, ByteString const& file )
if ( XMLChildNodeList* lst = p->GetChildList() )
if ( lst->Count() )
{
- ULONG i = 1;
+ sal_uIntPtr i = 1;
// Skip newline, if possible.
if ( lst->Count() > 1
&& lst->GetObject( 2 )->GetNodeType() == XML_NODE_TYPE_DEFAULT )
@@ -260,7 +260,7 @@ void TranslateLayout::MergeLanguage( ByteString const& language )
ByteString xmlFile = mFiles.front();
MergeDataFile mergeData( mLocalize, xmlFile,
- FALSE, RTL_TEXTENCODING_MS_1252 );
+ sal_False, RTL_TEXTENCODING_MS_1252 );
DirEntry aFile( xmlFile );
SimpleXMLParser aParser;
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 170c2922d9ce..3f27fe60a493 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -54,11 +54,11 @@ extern "C" { int YYWarning( char * ); }
#define STATE_FORCE 0x000B
// set of global variables
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bForce;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bForce;
+sal_Bool bUTF8;
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -78,19 +78,19 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bForce = FALSE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bForce = sal_False;
+ bUTF8 = sal_True;
bQuiet = false;
sPrj = "";
sPrjRoot = "";
sInputFileName = "";
sActFileName = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -114,19 +114,19 @@ extern char *GetOutputFile( int argc, char* argv[])
}
else if ( sSwitch == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( sSwitch == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( sSwitch == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( sSwitch == "-F" ) {
nState = STATE_FORCE;
- bForce = TRUE;
+ bForce = sal_True;
}
else if ( sSwitch == "-QQ" ) {
bQuiet = true;
@@ -144,7 +144,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
sInputFileName = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -162,7 +162,7 @@ extern char *GetOutputFile( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = ByteString( argv[ i ]);
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -175,7 +175,7 @@ extern char *GetOutputFile( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
+ bEnableExport = sal_True;
char *pReturn = new char[ sOutputFile.Len() + 1 ];
strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
return pReturn;
@@ -320,19 +320,19 @@ CfgStackData* CfgStack::Push( const ByteString &rTag, const ByteString &rId )
CfgStack::~CfgStack()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < Count(); i++ )
delete GetObject( i );
}
/*****************************************************************************/
-ByteString CfgStack::GetAccessPath( ULONG nPos )
+ByteString CfgStack::GetAccessPath( sal_uIntPtr nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
nPos = Count() - 1;
ByteString sReturn;
- for ( ULONG i = 0; i <= nPos; i++ ) {
+ for ( sal_uIntPtr i = 0; i <= nPos; i++ ) {
if ( i )
sReturn += ".";
sReturn += GetStackData( i )->GetIdentifier();
@@ -342,7 +342,7 @@ ByteString CfgStack::GetAccessPath( ULONG nPos )
}
/*****************************************************************************/
-CfgStackData *CfgStack::GetStackData( ULONG nPos )
+CfgStackData *CfgStack::GetStackData( sal_uIntPtr nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
@@ -359,7 +359,7 @@ CfgStackData *CfgStack::GetStackData( ULONG nPos )
CfgParser::CfgParser()
/*****************************************************************************/
: pStackData( NULL ),
- bLocalize( FALSE )
+ bLocalize( sal_False )
{
}
@@ -371,7 +371,7 @@ CfgParser::~CfgParser()
/*****************************************************************************/
-BOOL CfgParser::IsTokenClosed( const ByteString &rToken )
+sal_Bool CfgParser::IsTokenClosed( const ByteString &rToken )
/*****************************************************************************/
{
return rToken.GetChar( rToken.Len() - 2 ) == '/';
@@ -385,7 +385,7 @@ void CfgParser::AddText(
)
/*****************************************************************************/
{
- USHORT nTextLen = 0;
+ sal_uInt16 nTextLen = 0;
while ( rText.Len() != nTextLen ) {
nTextLen = rText.Len();
rText.SearchAndReplaceAll( "\n", " " );
@@ -418,7 +418,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
ByteString sTokenName;
ByteString sTokenId;
- BOOL bOutput = TRUE;
+ sal_Bool bOutput = sal_True;
switch ( nToken ) {
case CFG_TOKEN_PACKAGE:
@@ -450,7 +450,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
break;
case CFG_TOKEN_OORNAME:
sSearch = "oor:name=";
- bLocalize = TRUE;
+ bLocalize = sal_True;
break;
case CFG_TOKEN_OORVALUE:
sSearch = "oor:value=";
@@ -470,7 +470,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
sCurrentIsoLang = sTemp.GetToken( 1, '\"' ).GetToken( 0, '\"' );
if ( sCurrentIsoLang == NO_TRANSLATE_ISO )
- bLocalize = FALSE;
+ bLocalize = sal_False;
pStackData->sTextTag = sToken;
@@ -488,7 +488,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
ByteString sTemp( sToken );
sTemp.ToUpperAscii();
bLocalize = (( sTemp.Search( "CFG:TYPE=\"STRING\"" ) != STRING_NOTFOUND ) &&
- ( sTemp.Search( "CFG:LOCALIZED=\"TRUE\"" ) != STRING_NOTFOUND ));
+ ( sTemp.Search( "CFG:LOCALIZED=\"sal_True\"" ) != STRING_NOTFOUND ));
}
}
else if ( sTokenName == "label" ) {
@@ -525,11 +525,11 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
case CFG_TEXTCHAR:
sCurrentText += sToken;
- bOutput = FALSE;
+ bOutput = sal_False;
break;
case CFG_TOKEN_NO_TRANSLATE:
- bLocalize = FALSE;
+ bLocalize = sal_False;
break;
}
@@ -734,9 +734,9 @@ CfgMerge::CfgMerge(
: CfgOutputParser( rOutputFile ),
pMergeDataFile( NULL ),
pResData( NULL ),
- bGerman( FALSE ),
+ bGerman( sal_False ),
sFilename( rFilename ),
- bEnglish( FALSE )
+ bEnglish( sal_False )
{
if ( rMergeSource.Len()){
pMergeDataFile = new MergeDataFile(
@@ -786,9 +786,9 @@ void CfgMerge::WorkOnText(
}
//if ( nLangIndex.EqualsIgnoreCaseAscii("de") )
- // bGerman = TRUE;
+ // bGerman = sal_True;
if (( nLangIndex.EqualsIgnoreCaseAscii("en-US") ))
- bEnglish = TRUE;
+ bEnglish = sal_True;
PFormEntrys *pEntrys = pMergeDataFile->GetPFormEntrysCaseSensitive( pResData );
if ( pEntrys ) {
@@ -816,7 +816,7 @@ void CfgMerge::Output( const ByteString& rOutput )
pOutputStream->Write( rOutput.GetBuffer(), rOutput.Len());
}
-ULONG CfgStack::Push( CfgStackData *pStackData )
+sal_uIntPtr CfgStack::Push( CfgStackData *pStackData )
{
Insert( pStackData, LIST_APPEND );
return Count() - 1;
@@ -836,7 +836,7 @@ void CfgMerge::WorkOnRessourceEnd()
sCur = aLanguages[ n ];
ByteString sContent;
- pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , TRUE );
+ pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , sal_True );
if (
// (!sCur.EqualsIgnoreCaseAscii("de") ) &&
( !sCur.EqualsIgnoreCaseAscii("en-US") ) &&
@@ -878,6 +878,6 @@ void CfgMerge::WorkOnRessourceEnd()
}
delete pResData;
pResData = NULL;
- bGerman = FALSE;
- bEnglish = FALSE;
+ bGerman = sal_False;
+ bEnglish = sal_False;
}
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index a36f8bd2361f..f7330a9b5ed9 100644
--- a/l10ntools/source/directory.cxx
+++ b/l10ntools/source/directory.cxx
@@ -107,7 +107,7 @@ void Directory::readDirectory()
void Directory::readDirectory ( const rtl::OUString& sFullpath )
{
- BOOL fFinished;
+ sal_Bool fFinished;
HANDLE hList;
TCHAR szDir[MAX_PATH+1];
TCHAR szSubDir[MAX_PATH+1];
@@ -128,7 +128,7 @@ void Directory::readDirectory ( const rtl::OUString& sFullpath )
}
else
{
- fFinished = FALSE;
+ fFinished = sal_False;
while (!fFinished)
{
@@ -157,7 +157,7 @@ void Directory::readDirectory ( const rtl::OUString& sFullpath )
{
if (GetLastError() == ERROR_NO_MORE_FILES)
{
- fFinished = TRUE;
+ fFinished = sal_True;
}
}
}
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 59f29525eda4..36ec7985a26a 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -56,12 +56,12 @@ Export *pExport = 0L;
// set of global variables
DECLARE_LIST( FileList, ByteString * )
FileList aInputFileList;
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bBreakWhenHelpText;
-BOOL bUnmerge;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bBreakWhenHelpText;
+sal_Bool bUnmerge;
+sal_Bool bUTF8;
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -85,12 +85,12 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bBreakWhenHelpText = FALSE;
- bUnmerge = FALSE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bBreakWhenHelpText = sal_False;
+ bUnmerge = sal_False;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
sActFileName = "";
@@ -99,8 +99,8 @@ extern char *GetOutputFile( int argc, char* argv[])
sTempFile = "";
pTempFile = NULL;
bQuiet = false;
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -127,24 +127,24 @@ extern char *GetOutputFile( int argc, char* argv[])
}
else if (sSwitch == "-e" || sSwitch == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if (sSwitch == "-b" || sSwitch == "-B" ) {
nState = STATE_BREAKHELP;
- bBreakWhenHelpText = TRUE;
+ bBreakWhenHelpText = sal_True;
}
else if (sSwitch == "-u" || sSwitch == "-U" ) {
nState = STATE_UNMERGE;
- bUnmerge = TRUE;
- bMergeMode = TRUE;
+ bUnmerge = sal_True;
+ bMergeMode = sal_True;
}
else if ( sSwitch.ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( sSwitch.ToUpperAscii() == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( sSwitch == "-l" || sSwitch == "-L" ) {
nState = STATE_LANGUAGES;
@@ -156,7 +156,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
aInputFileList.Insert( new ByteString( argv[ i ]), LIST_APPEND );
- bInput = TRUE; // min. one source file found
+ bInput = sal_True; // min. one source file found
}
break;
case STATE_OUTPUT: {
@@ -173,7 +173,7 @@ extern char *GetOutputFile( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = ByteString( argv[ i ]);
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -186,7 +186,7 @@ extern char *GetOutputFile( int argc, char* argv[])
if( bUnmerge ) sMergeSrc = ByteString();
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
+ bEnableExport = sal_True;
char *pReturn = new char[ sOutputFile.Len() + 1 ];
strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
return pReturn;
@@ -249,8 +249,8 @@ extern FILE *GetNextFile()
ByteString sOrigFile( sFileName );
sFileName = Export::GetNativeFile( sFileName );
- delete aInputFileList.GetObject(( ULONG ) 0 );
- aInputFileList.Remove(( ULONG ) 0 );
+ delete aInputFileList.GetObject(( sal_uIntPtr ) 0 );
+ aInputFileList.Remove(( sal_uIntPtr ) 0 );
if ( sFileName == "" ) {
fprintf( stderr, "ERROR: Could not precompile File %s\n",
@@ -336,7 +336,7 @@ int GetError()
// get error at global instance of class Export
if ( pExport->GetError())
return 1;
- return FALSE;
+ return sal_False;
}
}
@@ -384,7 +384,7 @@ bool ResData::isMerged( ByteString& sLang ){
}
/*****************************************************************************/
-BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
+sal_Bool ResData::SetId( const ByteString &rId, sal_uInt16 nLevel )
/*****************************************************************************/
{
if ( nLevel > nIdLevel )
@@ -408,10 +408,10 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
sId.EraseTrailingChars( '\t' );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//
@@ -419,14 +419,14 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
//
/*****************************************************************************/
-Export::Export( const ByteString &rOutput, BOOL bWrite,
+Export::Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile )
/*****************************************************************************/
:
pWordTransformer( NULL ),
aCharSet( RTL_TEXTENCODING_MS_1252 ),
- bDefine( FALSE ),
- bNextMustBeDefineEOL( FALSE ),
+ bDefine( sal_False ),
+ bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
nList( LIST_NON ),
nListIndex( 0 ),
@@ -436,9 +436,9 @@ Export::Export( const ByteString &rOutput, BOOL bWrite,
sRoot( sPrjRoot ),
bEnableExport( bWrite ),
bMergeMode( bUnmerge ),
- bError( FALSE ),
- bReadOver( FALSE ),
- bDontWriteOutput( FALSE ),
+ bError( sal_False ),
+ bReadOver( sal_False ),
+ bDontWriteOutput( sal_False ),
sFilename( rFile )
{
pParseQueue = new ParserQueue( *this );
@@ -463,15 +463,15 @@ Export::Export( const ByteString &rOutput, BOOL bWrite,
}
/*****************************************************************************/
-Export::Export( const ByteString &rOutput, BOOL bWrite,
+Export::Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot,
const ByteString &rMergeSource , const ByteString& rFile )
/*****************************************************************************/
:
pWordTransformer( NULL ),
aCharSet( RTL_TEXTENCODING_MS_1252 ),
- bDefine( FALSE ),
- bNextMustBeDefineEOL( FALSE ),
+ bDefine( sal_False ),
+ bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
nList( LIST_NON ),
nListIndex( 0 ),
@@ -480,11 +480,11 @@ Export::Export( const ByteString &rOutput, BOOL bWrite,
sProject( sPrj ),
sRoot( sPrjRoot ),
bEnableExport( bWrite ),
- bMergeMode( TRUE ),
+ bMergeMode( sal_True ),
sMergeSrc( rMergeSource ),
- bError( FALSE ),
- bReadOver( FALSE ),
- bDontWriteOutput( FALSE ),
+ bError( sal_False ),
+ bReadOver( sal_False ),
+ bDontWriteOutput( sal_False ),
sFilename( rFile )
{
(void) rPrj;
@@ -509,15 +509,15 @@ void Export::Init()
{
// resets the internal status, used before parseing another file
sActPForm = "";
- bDefine = FALSE;
- bNextMustBeDefineEOL = FALSE;
+ bDefine = sal_False;
+ bNextMustBeDefineEOL = sal_False;
nLevel = 0;
nList = LIST_NON;
nListLang = ByteString( String::CreateFromAscii(""),RTL_TEXTENCODING_ASCII_US );
nListIndex = 0;
while ( aResStack.Count()) {
- delete aResStack.GetObject(( ULONG ) 0 );
- aResStack.Remove(( ULONG ) 0 );
+ delete aResStack.GetObject(( sal_uIntPtr ) 0 );
+ aResStack.Remove(( sal_uIntPtr ) 0 );
}
}
@@ -531,8 +531,8 @@ Export::~Export()
if ( bEnableExport )
aOutput.Close();
while ( aResStack.Count()) {
- delete aResStack.GetObject(( ULONG ) 0 );
- aResStack.Remove(( ULONG ) 0 );
+ delete aResStack.GetObject(( sal_uIntPtr ) 0 );
+ aResStack.Remove(( sal_uIntPtr ) 0 );
}
if ( bMergeMode && !bUnmerge ) {
@@ -555,16 +555,16 @@ int Export::Execute( int nToken, const char * pToken )
printf("sToken = %s\n",sToken.GetBuffer());
printf("nToken = %d\n",nToken);
printf("+---------------\n"); */
- BOOL bWriteToMerged = bMergeMode;
+ sal_Bool bWriteToMerged = bMergeMode;
if ( nToken == CONDITION ) {
ByteString sTestToken( pToken );
sTestToken.EraseAllChars( '\t' );
sTestToken.EraseAllChars( ' ' );
if (( !bReadOver ) && ( sTestToken.Search( "#ifndef__RSC_PARSER" ) == 0 ))
- bReadOver = TRUE;
+ bReadOver = sal_True;
else if (( bReadOver ) && ( sTestToken.Search( "#endif" ) == 0 ))
- bReadOver = FALSE;
+ bReadOver = sal_False;
}
if ((( nToken < FILTER_LEVEL ) || ( bReadOver )) &&
(!(( bNextMustBeDefineEOL ) && ( sOrig == "\n" )))) {
@@ -608,21 +608,21 @@ int Export::Execute( int nToken, const char * pToken )
if ( bNextMustBeDefineEOL ) {
if ( nToken != RSCDEFINELEND ) {
// end of macro found, so destroy res.
- bDefine = FALSE;
+ bDefine = sal_False;
if ( bMergeMode ) {
/*if ( bDontWriteOutput && bUnmerge ) {
- bDontWriteOutput = FALSE;
- bNextMustBeDefineEOL = FALSE;
- bDefine = TRUE;
+ bDontWriteOutput = sal_False;
+ bNextMustBeDefineEOL = sal_False;
+ bDefine = sal_True;
}*/
MergeRest( pResData );
}
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
Execute( LEVELDOWN, "" );
}
else {
// next line also in macro definition
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
if ( bMergeMode )
WriteToMerged( sOrig , false );
return 1;
@@ -635,20 +635,20 @@ int Export::Execute( int nToken, const char * pToken )
#if 0
// impossible, unsigned is never negative
if( sTmpLine.Len() < 0 ){
- if ( sTmpLine.GetChar(( USHORT )( sTmpLine.Len() - 1 )) != '\\' )
- bNextMustBeDefineEOL = TRUE;
+ if ( sTmpLine.GetChar(( sal_uInt16 )( sTmpLine.Len() - 1 )) != '\\' )
+ bNextMustBeDefineEOL = sal_True;
}
#endif
}
}
}
- BOOL bExecuteDown = FALSE;
+ sal_Bool bExecuteDown = sal_False;
if ( nToken != LEVELDOWN ) {
- USHORT nOpen = 0;
- USHORT nClose = 0;
- BOOL bReadOver1 = FALSE;
- USHORT i = 0;
+ sal_uInt16 nOpen = 0;
+ sal_uInt16 nClose = 0;
+ sal_Bool bReadOver1 = sal_False;
+ sal_uInt16 i = 0;
for ( i = 0; i < sToken.Len(); i++ ) {
if ( sToken.GetChar( i ) == '\"' )
bReadOver1 = !bReadOver1;
@@ -656,7 +656,7 @@ int Export::Execute( int nToken, const char * pToken )
nOpen++;
}
- bReadOver1 = FALSE;
+ bReadOver1 = sal_False;
for ( i = 0; i < sToken.Len(); i++ ) {
if ( sToken.GetChar( i ) == '\"' )
bReadOver1 = !bReadOver1;
@@ -665,7 +665,7 @@ int Export::Execute( int nToken, const char * pToken )
}
if ( nOpen < nClose )
- bExecuteDown = TRUE;
+ bExecuteDown = sal_True;
}
switch ( nToken ) {
@@ -685,17 +685,17 @@ int Export::Execute( int nToken, const char * pToken )
case RSCDEFINE:
- bDefine = TRUE; // res. defined in macro
+ bDefine = sal_True; // res. defined in macro
case RESSOURCE:
case RESSOURCEEXPR: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nToken != RSCDEFINE )
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
// this is the beginning of a new res.
nLevel++;
if ( nLevel > 1 ) {
- aResStack.GetObject( nLevel - 2 )->bChild = TRUE;
+ aResStack.GetObject( nLevel - 2 )->bChild = sal_True;
}
// create new instance for this res. and fill mandatory fields
@@ -732,12 +732,12 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case SMALRESSOURCE: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
// this is the beginning of a new res.
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
nLevel++;
if ( nLevel > 1 ) {
- aResStack.GetObject( nLevel - 2 )->bChild = TRUE;
+ aResStack.GetObject( nLevel - 2 )->bChild = sal_True;
}
// create new instance for this res. and fill mandatory fields
@@ -760,13 +760,13 @@ int Export::Execute( int nToken, const char * pToken )
if ( nList )
break;
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
ByteString sLowerTyp;
if ( pResData )
sLowerTyp = "unknown";
nLevel++;
if ( nLevel > 1 ) {
- aResStack.GetObject( nLevel - 2 )->bChild = TRUE;
+ aResStack.GetObject( nLevel - 2 )->bChild = sal_True;
}
ResData *pNewData = new ResData( sActPForm, FullId() , sFilename );
@@ -777,11 +777,11 @@ int Export::Execute( int nToken, const char * pToken )
case LEVELDOWN: {
// pop
if ( !nList ) {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nLevel ) {
if ( bDefine && (nLevel == 1 )) {
- bDefine = FALSE;
- bNextMustBeDefineEOL = FALSE;
+ bDefine = sal_False;
+ bNextMustBeDefineEOL = sal_False;
}
WriteData( pResData );
delete aResStack.GetObject( nLevel - 1 );
@@ -791,7 +791,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else {
if ( bDefine )
- bNextMustBeDefineEOL = TRUE;
+ bNextMustBeDefineEOL = sal_True;
if ( !nListLevel ) {
if ( bMergeMode )
MergeRest( pResData, MERGE_MODE_LIST );
@@ -803,7 +803,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case ASSIGNMENT: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
// interpret different types of assignement
ByteString sKey = sToken.GetToken( 0, '=' );
sKey.EraseAllChars( ' ' );
@@ -822,7 +822,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
//}
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_STRING;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -833,7 +833,7 @@ int Export::Execute( int nToken, const char * pToken )
//if ( bUnmerge ){
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
//}
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_FILTER;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -843,7 +843,7 @@ int Export::Execute( int nToken, const char * pToken )
else if ( sKey == "UIENTRIES" ) {
//if ( bUnmerge ){
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));}
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_UIENTRIES;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -857,15 +857,15 @@ int Export::Execute( int nToken, const char * pToken )
Parse( LEVELUP, "" );
}
//if ( bUnmerge && ( nListLang.EqualsIgnoreCaseAscii("de") || nListLang.EqualsIgnoreCaseAscii("en-US") ) && ListExists( pResData, nList ))
- // bDontWriteOutput = TRUE;
+ // bDontWriteOutput = sal_True;
}
break;
case UIENTRIES:
case LISTASSIGNMENT: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
ByteString sTmpToken( sToken);
sTmpToken.EraseAllChars(' ');
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
//nPos = sTmpToken.ToLowerAscii().Search("[de]=");
nPos = sTmpToken.ToLowerAscii().Search("[en-us]=");
if( nPos != STRING_NOTFOUND ) {
@@ -878,7 +878,7 @@ int Export::Execute( int nToken, const char * pToken )
ByteString sValue = sToken.GetToken( 1, '=' );
CleanValue( sValue );
if ( sKey.ToUpperAscii() == "STRINGLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_STRING;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -886,7 +886,7 @@ int Export::Execute( int nToken, const char * pToken )
nListLevel = 0;
}
else if ( sKey == "FILTERLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_FILTER;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -895,7 +895,7 @@ int Export::Execute( int nToken, const char * pToken )
}
// PairedList
else if ( sKey == "PAIREDLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_PAIRED;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -904,7 +904,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else if ( sKey == "ITEMLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_ITEM;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -912,7 +912,7 @@ int Export::Execute( int nToken, const char * pToken )
nListLevel = 0;
}
else if ( sKey == "UIENTRIES" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_UIENTRIES;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -922,7 +922,7 @@ int Export::Execute( int nToken, const char * pToken )
/*if ( bUnmerge && ( nListLang.EqualsIgnoreCaseAscii( "de" )
|| nListLang.EqualsIgnoreCaseAscii("en-US" ) )
&& ListExists( pResData, nList ))
- bDontWriteOutput = TRUE;*/
+ bDontWriteOutput = sal_True;*/
}
else {
// new res. is a String- or FilterList
@@ -944,11 +944,11 @@ int Export::Execute( int nToken, const char * pToken )
CleanValue( sLang );
nListLang = sLang;
/*if (( bUnmerge ) && ( !nListLang.EqualsIgnoreCaseAscii("de")) && ( !nListLang.EqualsIgnoreCaseAscii("en-US")))
- bDontWriteOutput = TRUE;*/
+ bDontWriteOutput = sal_True;*/
nListIndex = 0;
nListLevel = 0;
/*if ( bUnmerge && nListLang.EqualsIgnoreCaseAscii("de") && ListExists( pResData, nList ) )
- bDontWriteOutput = TRUE;*/
+ bDontWriteOutput = sal_True;*/
}
}
}
@@ -975,7 +975,7 @@ int Export::Execute( int nToken, const char * pToken )
break;
case LONGTEXTLINE:
case TEXTLINE:
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nLevel ) {
CutComment( sToken );
@@ -1008,7 +1008,7 @@ int Export::Execute( int nToken, const char * pToken )
if ( Export::isSourceLanguage( nLangIndex ) )
pResData->SetId( sText, ID_LEVEL_TEXT );
- pResData->bText = TRUE;
+ pResData->bText = sal_True;
pResData->sTextTyp = sOrigKey;
if ( bMergeMode ) {
PrepareTextToMerge( sOrig, STRING_TYP_TEXT, nLangIndex, pResData );
@@ -1029,7 +1029,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
// }
SetChildWithText();
- pResData->bHelpText = TRUE;
+ pResData->bHelpText = sal_True;
if ( bBreakWhenHelpText ) {
ByteString sError( "\"HelpText\" found in source\n" );
YYWarning( sError.GetBufferAccess());
@@ -1054,7 +1054,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
// }
SetChildWithText();
- pResData->bQuickHelpText = TRUE;
+ pResData->bQuickHelpText = sal_True;
if ( bMergeMode )
PrepareTextToMerge( sOrig, STRING_TYP_QUICKHELPTEXT, nLangIndex, pResData );
//if ( bUnmerge )
@@ -1073,7 +1073,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
// }
SetChildWithText();
- pResData->bTitle = TRUE;
+ pResData->bTitle = sal_True;
if ( bMergeMode )
PrepareTextToMerge( sOrig, STRING_TYP_TITLE, nLangIndex, pResData );
//if ( bUnmerge )
@@ -1097,7 +1097,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case NEWTEXTINRES: {
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
// this means something like // ### Achtung : Neuer Text ...
/*ByteString sLang( "GERMAN" );
ByteString sText = sToken.GetToken( 2, ':' ).GetToken( 0, '*' );
@@ -1107,7 +1107,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case APPFONTMAPPING: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
// this is a AppfontMapping, so look if its a definition
// of field size
ByteString sKey = sToken.GetToken( 0, '=' );
@@ -1119,18 +1119,18 @@ int Export::Execute( int nToken, const char * pToken )
sMapping.EraseAllChars( ' ' );
sMapping.EraseAllChars( '\t' );
if ( sKey.ToUpperAscii() == "SIZE" ) {
- pResData->nWidth = ( USHORT ) sMapping.GetToken( 0, ',' ).ToInt64();
+ pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 0, ',' ).ToInt64();
}
else if ( sKey == "POSSIZE" ) {
- pResData->nWidth = ( USHORT ) sMapping.GetToken( 2, ',' ).ToInt64();
+ pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 2, ',' ).ToInt64();
}
}
break;
case RSCDEFINELEND:
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
break;
case CONDITION: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
while( sToken.SearchAndReplace( "\r", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {};
@@ -1159,16 +1159,16 @@ int Export::Execute( int nToken, const char * pToken )
}
else break;
if ( nLevel ) {
- WriteData( pResData, TRUE );
+ WriteData( pResData, sal_True );
pResData->sPForm = sActPForm;
}
}
break;
case EMPTYLINE : {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( bDefine ) {
- bNextMustBeDefineEOL = FALSE;
- bDefine = FALSE;
+ bNextMustBeDefineEOL = sal_False;
+ bDefine = sal_False;
while ( nLevel )
Parse( LEVELDOWN, "" );
//WorkOnTokenSet( LEVELDOWN, pTkn );
@@ -1176,7 +1176,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case PRAGMA : {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {};
sToken.EraseLeadingChars( ' ' );
@@ -1199,11 +1199,11 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case TEXTREFID : {
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
/*ByteString sK = sToken.GetToken( 0, '=' );
ByteString sKey = sK.EraseAllChars( '\t' ).EraseAllChars( ' ' );
ByteString sT = sToken.GetToken( 1, '=' ).GetToken( 0, ';' );
- USHORT nRefId = ( USHORT ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32();
+ sal_uInt16 nRefId = ( sal_uInt16 ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32();
if (( sKey.ToUpperAscii() == "TEXT" ) ||
( sKey == "MESSAGE" ) ||
( sKey == "CUSTOMUNITTEXT" ) ||
@@ -1222,7 +1222,7 @@ int Export::Execute( int nToken, const char * pToken )
// the current token must be written to dest. without merging
if( bDefine && sOrig.Len() > 2 ){
- for( USHORT n = 0 ; n < sOrig.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sOrig.Len() ; n++ ){
if( sOrig.GetChar( n ) == '\n' && sOrig.GetChar( n-1 ) != '\\'){
sOrig.Insert('\\' , n++ );
}
@@ -1246,8 +1246,8 @@ void Export::CutComment( ByteString &rText )
if ( rText.Search( "//" ) != STRING_NOTFOUND ) {
ByteString sWork( rText );
sWork.SearchAndReplaceAll( "\\\"", "XX" );
- USHORT i = 0;
- BOOL bInner = FALSE;
+ sal_uInt16 i = 0;
+ sal_Bool bInner = sal_False;
while ( i < sWork.Len() - 1 ) {
if ( sWork.GetChar( i ) == '\"' )
@@ -1266,8 +1266,8 @@ void Export::CutComment( ByteString &rText )
}
void Export::UnmergeUTF8( ByteString& sOrig ){
- USHORT nPos1 = sOrig.Search('\"');
- USHORT nPos2 = sOrig.SearchBackward('\"');
+ sal_uInt16 nPos1 = sOrig.Search('\"');
+ sal_uInt16 nPos2 = sOrig.SearchBackward('\"');
if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){
ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1);
ByteString sPartUTF8 = sPart;
@@ -1277,7 +1277,7 @@ void Export::UnmergeUTF8( ByteString& sOrig ){
}
/*****************************************************************************/
-BOOL Export::ListExists( ResData *pResData, USHORT nLst )
+sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst )
/*****************************************************************************/
{
switch ( nLst ) {
@@ -1287,20 +1287,20 @@ BOOL Export::ListExists( ResData *pResData, USHORT nLst )
case LIST_PAIRED: return pResData->pPairedList != NULL;
case LIST_UIENTRIES: return pResData->pUIEntries != NULL;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
-BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew )
+sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
/*****************************************************************************/
{
if ( bMergeMode ) {
MergeRest( pResData );
- return TRUE;
+ return sal_True;
}
if ( bUnmerge )
- return TRUE;
+ return sal_True;
/* ByteStringHashMap::iterator pos3 = pResData->sText.begin();
ByteStringHashMap::iterator end3 = pResData->sText.end();
@@ -1461,7 +1461,7 @@ BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew )
if ( bCreateNew )
pResData->pUIEntries = 0;
}
- return TRUE;
+ return sal_True;
}
ByteString Export::GetPairedListID( const ByteString& sText ){
// < "STRING" ; IDENTIFIER ; > ;
@@ -1489,8 +1489,8 @@ ByteString Export::StripList( const ByteString& sText ){
}
/*****************************************************************************/
-BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
- const ByteString &rTyp, BOOL bCreateNew )
+sal_Bool Export::WriteExportList( ResData *pResData, ExportList *pExportList,
+ const ByteString &rTyp, sal_Bool bCreateNew )
/*****************************************************************************/
{
ByteString sGID = pResData->sGId;
@@ -1504,7 +1504,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
ByteString sTimeStamp( Export::GetTimeStamp());
ByteString sCur;
- for ( ULONG i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) {
ExportListEntry *pEntry = pExportList->GetObject( i );
// mandatory for export: german and eng. and/or enus
//ByteString a("Export::WriteExportList::pEntry");
@@ -1567,7 +1567,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
if ( bCreateNew )
delete pExportList;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -1577,7 +1577,7 @@ ByteString Export::FullId()
ByteString sFull;
if ( nLevel > 1 ) {
sFull = aResStack.GetObject( 0 )->sId;
- for ( USHORT i = 1; i < nLevel - 1; i++ ) {
+ for ( sal_uInt16 i = 1; i < nLevel - 1; i++ ) {
ByteString sToAdd = aResStack.GetObject( i )->sId;
if ( sToAdd.Len()) {
sFull += ".";
@@ -1707,7 +1707,7 @@ void Export::CleanValue( ByteString &rValue )
}
if ( rValue.Len()) {
- for ( USHORT i = rValue.Len() - 1; i > 0; i-- ) {
+ for ( sal_uInt16 i = rValue.Len() - 1; i > 0; i-- ) {
if (( rValue.GetChar( i ) == ' ' ) || ( rValue.GetChar( i ) == '\t' ) ||
( rValue.GetChar( i ) == '\n' ) || ( rValue.GetChar( i ) == ';' ) ||
( rValue.GetChar( i ) == '{' ) || ( rValue.GetChar( i ) == '\\' ) ||
@@ -1745,14 +1745,14 @@ ByteString Export::GetText( const ByteString &rSource, int nToken )
while ( sTmp.SearchAndReplace( "\\0x7F", "-=<[0x7F]>=-" )
!= STRING_NOTFOUND ) {};
- USHORT nStart = 0;
- USHORT nState = TXT_STATE_MACRO;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nState = TXT_STATE_MACRO;
nState = TXT_STATE_TEXT;
nStart = 1;
- for ( USHORT i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) {
+ for ( sal_uInt16 i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) {
ByteString sToken = sTmp.GetToken( i, '\"' );
if ( sToken.Len()) {
if ( nState == TXT_STATE_TEXT ) {
@@ -1812,7 +1812,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
ByteString sText( rText );
while ( sText.SearchAndReplace( " \n", "\n" ) != STRING_NOTFOUND ) {};
if( pParseQueue->bNextIsM && bSDFContent && sText.Len() > 2 ){
- for( USHORT n = 0 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
@@ -1820,7 +1820,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
}
}
else if( pParseQueue->bLastWasM && sText.Len() > 2 ){
- for( USHORT n = 0 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
}
@@ -1828,7 +1828,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
}
}
else if( pParseQueue->bCurrentIsM && bSDFContent && sText.Len() > 2 ){
- for( USHORT n = 0 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
pParseQueue->bMflag=true;
@@ -1836,13 +1836,13 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
}
}
else if( pParseQueue->bMflag ){
- for( USHORT n = 1 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 1 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
}
}
}
- for ( USHORT i = 0; i < sText.Len(); i++ ) {
+ for ( sal_uInt16 i = 0; i < sText.Len(); i++ ) {
if ( sText.GetChar( i ) != '\n' ){
aOutput.Write( ByteString( sText.GetChar( i )).GetBuffer(), 1 );
@@ -1859,11 +1859,11 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
void Export::ConvertMergeContent( ByteString &rText )
/*****************************************************************************/
{
- BOOL bNoOpen = ( rText.Search( "\\\"" ) != 0 );
+ sal_Bool bNoOpen = ( rText.Search( "\\\"" ) != 0 );
ByteString sClose( rText.Copy( rText.Len() - 2 ));
- BOOL bNoClose = ( sClose != "\\\"" );
+ sal_Bool bNoClose = ( sClose != "\\\"" );
ByteString sNew;
- for ( USHORT i = 0; i < rText.Len(); i++ ) {
+ for ( sal_uInt16 i = 0; i < rText.Len(); i++ ) {
ByteString sChar( rText.GetChar( i ));
if ( sChar == "\\" ) {
if (( i + 1 ) < rText.Len()) {
@@ -1912,13 +1912,13 @@ void Export::ConvertMergeContent( ByteString &rText )
}
/*****************************************************************************/
-BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
+sal_Bool Export::PrepareTextToMerge( ByteString &rText, sal_uInt16 nTyp,
ByteString &nLangIndex, ResData *pResData )
/*****************************************************************************/
{
// position to merge in:
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
ByteString sOldId = pResData->sId;
ByteString sOldGId = pResData->sGId;
ByteString sOldTyp = pResData->sResTyp;
@@ -1933,7 +1933,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
case LIST_ITEM :
{
if ( bUnmerge )
- return TRUE;
+ return sal_True;
ExportList *pList = NULL;
switch ( nTyp ) {
@@ -1980,17 +1980,17 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
nStart = rText.Search( "\"" );
if ( nStart == STRING_NOTFOUND ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for ( nEnd = nStart + 1; nEnd < rText.Len() && !bFound; nEnd++ ) {
if ( rText.GetChar( nEnd ) == '\"' )
- bFound = TRUE;
+ bFound = sal_True;
}
if ( !bFound ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
nEnd --;
@@ -2022,22 +2022,22 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
if (( nLangIndex != ByteString("de") ) &&
( nLangIndex != ByteString("en-US") ))
{
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
}
- return TRUE;
+ return sal_True;
}*/
nStart = rText.Search( "=" );
if ( nStart == STRING_NOTFOUND ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
nStart++;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while(( nStart < rText.Len()) && !bFound ) {
if (( rText.GetChar( nStart ) != ' ' ) && ( rText.GetChar( nStart ) != '\t' ))
- bFound = TRUE;
+ bFound = sal_True;
else
nStart ++;
}
@@ -2045,19 +2045,19 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
// no start position found
if ( !bFound ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
// position to end mergeing in
nEnd = rText.Len() - 1;
- bFound = FALSE;
+ bFound = sal_False;
while (( nEnd > nStart ) && !bFound ) {
if (( rText.GetChar( nEnd ) != ' ' ) && ( rText.GetChar( nEnd ) != '\t' ) &&
( rText.GetChar( nEnd ) != '\n' ) && ( rText.GetChar( nEnd ) != ';' ) &&
( rText.GetChar( nEnd ) != '{' ) && ( rText.GetChar( nEnd ) != '\\' ))
{
- bFound = TRUE;
+ bFound = sal_True;
}
else
nEnd --;
@@ -2092,7 +2092,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
if ( !pEntrys ) {
rText = sOrigText;
- return FALSE; // no data found
+ return sal_False; // no data found
}
ByteString sContent;
@@ -2100,12 +2100,12 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
//if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) {
if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
rText = sOrigText;
- return FALSE; // no data found
+ return sal_False; // no data found
}
//if ( nLangIndex.EqualsIgnoreCaseAscii("en-US") ) {
if ( Export::isSourceLanguage( nLangIndex ) ) {
- return FALSE;
+ return sal_False;
}
ByteString sPostFix( rText.Copy( ++nEnd ));
@@ -2121,11 +2121,11 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
rText += sContent;
rText += sPostFix;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-void Export::MergeRest( ResData *pResData, USHORT nMode )
+void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
/*****************************************************************************/
{
//if ( bUnmerge ) { return;}
@@ -2149,8 +2149,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
bool bWriteNoSlash = false;
if ( pEntry && pResData->bText ) {
- BOOL bAddSemikolon = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bAddSemikolon = sal_False;
+ sal_Bool bFirst = sal_True;
ByteString sCur;
ByteString sTmp = Export::sLanguages;
@@ -2158,7 +2158,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE );
+ sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , sal_True );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2167,7 +2167,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += pResData->sTextTyp;
//if ( !sCur.EqualsIgnoreCaseAscii("en-US")) {
@@ -2188,8 +2188,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else if ( !bNextMustBeDefineEOL )
sOutput += ";\n";
else
- bAddSemikolon = TRUE;
- for ( USHORT j = 1; j < nLevel; j++ )
+ bAddSemikolon = sal_True;
+ for ( sal_uInt16 j = 1; j < nLevel; j++ )
sOutput += "\t";
WriteToMerged( sOutput , true );
}
@@ -2203,15 +2203,15 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
if ( pEntry && pResData->bQuickHelpText ) {
- BOOL bAddSemikolon = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bAddSemikolon = sal_False;
+ sal_Bool bFirst = sal_True;
ByteString sCur;
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
+ sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, sal_True );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2220,7 +2220,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += "QuickHelpText";
//if ( !sCur.EqualsIgnoreCaseAscii("en-US") ) {
@@ -2237,8 +2237,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else if ( !bNextMustBeDefineEOL )
sOutput += ";\n";
else
- bAddSemikolon = TRUE;
- for ( USHORT j = 1; j < nLevel; j++ )
+ bAddSemikolon = sal_True;
+ for ( sal_uInt16 j = 1; j < nLevel; j++ )
sOutput += "\t";
WriteToMerged( sOutput ,true );
}
@@ -2250,15 +2250,15 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
if ( pEntry && pResData->bTitle ) {
- BOOL bAddSemikolon = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bAddSemikolon = sal_False;
+ sal_Bool bFirst = sal_True;
ByteString sCur;
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE );
+ sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, sal_True );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2267,7 +2267,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += "Title";
//if ( !sCur.EqualsIgnoreCaseAscii("en-US") ) {
@@ -2284,8 +2284,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else if ( !bNextMustBeDefineEOL )
sOutput += ";\n";
else
- bAddSemikolon = TRUE;
- for ( USHORT j = 1; j < nLevel; j++ )
+ bAddSemikolon = sal_True;
+ for ( sal_uInt16 j = 1; j < nLevel; j++ )
sOutput += "\t";
WriteToMerged( sOutput ,true );
}
@@ -2309,9 +2309,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
pResData->sGId += ".";
pResData->sGId += sOldId;
ByteString sSpace;
- for ( USHORT i = 1; i < nLevel-1; i++ )
+ for ( sal_uInt16 i = 1; i < nLevel-1; i++ )
sSpace += "\t";
- for ( USHORT nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) {
+ for ( sal_uInt16 nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) {
ExportList *pList = NULL;
switch ( nT ) {
case LIST_STRING : pResData->sResTyp = "stringlist"; pList = pResData->pStringList; bPairedList = false; break;
@@ -2323,7 +2323,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
ByteString sCur;
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
- USHORT nIdx = 1;
+ sal_uInt16 nIdx = 1;
// Set matching pairedlist identifier
if( bPairedList && pResData->pPairedList && ( nIdx == 1 ) ){
@@ -2334,18 +2334,18 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
pResData->sId = ByteString("1");
PFormEntrys *pEntrys;
- ULONG nLIndex = 0;
- ULONG nMaxIndex = 0;
+ sal_uIntPtr nLIndex = 0;
+ sal_uIntPtr nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
pEntrys = pMergeDataFile->GetPFormEntrys( pResData );
while( pEntrys && ( nLIndex < nMaxIndex )) {
//printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex);
ByteString sText;
- BOOL bText;
- bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE );
+ sal_Bool bText;
+ bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, sal_True );
if( !bText )
- bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
+ bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , sal_False );
// Use fallback, if data is missing in sdf file
//if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){
@@ -2408,7 +2408,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
}
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
nStart = sLine.Search( "\"" );
ByteString sPostFix;
@@ -2492,7 +2492,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
nListIndex++;
- ULONG nMaxIndex = 0;
+ sal_uIntPtr nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
ByteString sLine;
@@ -2517,7 +2517,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sText += sLine;
sText += " ;";
sText += "\n";
- for ( USHORT i = 0; i < nLevel; i++ )
+ for ( sal_uInt16 i = 0; i < nLevel; i++ )
sText += "\t";
WriteToMerged( sText ,false );
nListIndex++;
@@ -2547,15 +2547,15 @@ void Export::SetChildWithText()
/*****************************************************************************/
{
if ( aResStack.Count() > 1 ) {
- for ( ULONG i = 0; i < aResStack.Count() - 1; i++ ) {
- aResStack.GetObject( i )->bChildWithText = TRUE;
+ for ( sal_uIntPtr i = 0; i < aResStack.Count() - 1; i++ ) {
+ aResStack.GetObject( i )->bChildWithText = sal_True;
}
}
}
void ParserQueue::Push( const QueueEntry& aEntry ){
// printf("nTyp = %d ",aEntry.nTyp);
- USHORT nLen = aEntry.sLine.Len();
+ sal_uInt16 nLen = aEntry.sLine.Len();
if( !bStart ){
aQueueCur->push( aEntry );
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 8a384b415b6f..b6c42d27303c 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -52,7 +52,7 @@ ResData::~ResData()
{
if ( pStringList ) {
// delete existing res. of type StringList
- for ( ULONG i = 0; i < pStringList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pStringList->Count(); i++ ) {
ExportListEntry* test = pStringList->GetObject( i );
if( test != NULL ) delete test;
}
@@ -60,7 +60,7 @@ ResData::~ResData()
}
if ( pFilterList ) {
// delete existing res. of type FilterList
- for ( ULONG i = 0; i < pFilterList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pFilterList->Count(); i++ ) {
ExportListEntry* test = pFilterList->GetObject( i );
delete test;
}
@@ -68,7 +68,7 @@ ResData::~ResData()
}
if ( pItemList ) {
// delete existing res. of type ItemList
- for ( ULONG i = 0; i < pItemList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pItemList->Count(); i++ ) {
ExportListEntry* test = pItemList->GetObject( i );
delete test;
}
@@ -76,7 +76,7 @@ ResData::~ResData()
}
if ( pUIEntries ) {
// delete existing res. of type UIEntries
- for ( ULONG i = 0; i < pUIEntries->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pUIEntries->Count(); i++ ) {
ExportListEntry* test = pUIEntries->GetObject( i );
delete test;
}
@@ -145,8 +145,8 @@ void Export::QuotHTMLXRM( ByteString &rString )
/*****************************************************************************/
{
ByteString sReturn;
- //BOOL bBreak = FALSE;
- for ( USHORT i = 0; i < rString.Len(); i++ ) {
+ //sal_Bool bBreak = sal_False;
+ for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) {
ByteString sTemp = rString.Copy( i );
if ( sTemp.Search( "<Arg n=" ) == 0 ) {
while ( i < rString.Len() && rString.GetChar( i ) != '>' ) {
@@ -214,7 +214,7 @@ void Export::QuotHTML( ByteString &rString )
/*****************************************************************************/
{
ByteString sReturn;
- for ( USHORT i = 0; i < rString.Len(); i++ ) {
+ for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) {
ByteString sTemp = rString.Copy( i );
if ( sTemp.Search( "<Arg n=" ) == 0 ) {
while ( i < rString.Len() && rString.GetChar( i ) != '>' ) {
@@ -444,7 +444,7 @@ void Export::InitLanguages( bool bMergeMode ){
if( !isInitialized ){
ByteString sTmp;
ByteStringBoolHashMap aEnvLangs;
- for ( USHORT x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){
+ for ( sal_uInt16 x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){
sTmp = sLanguages.GetToken( x, ',' ).GetToken( 0, '=' );
sTmp.EraseLeadingAndTrailingChars();
if( bMergeMode && !isAllowed( sTmp ) ){}
@@ -461,7 +461,7 @@ void Export::InitForcedLanguages( bool bMergeMode ){
/*****************************************************************************/
ByteString sTmp;
ByteStringBoolHashMap aEnvLangs;
- for ( USHORT x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
+ for ( sal_uInt16 x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
sTmp = sForcedLanguages.GetToken( x, ',' ).GetToken( 0, '=' );
sTmp.EraseLeadingAndTrailingChars();
if( bMergeMode && isAllowed( sTmp ) ){}
@@ -558,7 +558,7 @@ void Export::FillInListFallbacks(
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pList->Count(); i++ ) {
ExportListEntry *pEntry = pList->GetObject( i );
if ( !( *pEntry )[ nSource ].Len()){
( *pEntry )[ nSource ] = ( *pEntry )[ nFallback ];
@@ -582,7 +582,7 @@ ByteString Export::GetTimeStamp()
}
/*****************************************************************************/
-BOOL Export::ConvertLineEnds(
+sal_Bool Export::ConvertLineEnds(
ByteString sSource, ByteString sDestination )
/*****************************************************************************/
{
@@ -591,11 +591,11 @@ BOOL Export::ConvertLineEnds(
SvFileStream aSource( sSourceFile, STREAM_READ );
if ( !aSource.IsOpen())
- return FALSE;
+ return sal_False;
SvFileStream aDestination( sDestinationFile, STREAM_STD_WRITE | STREAM_TRUNC );
if ( !aDestination.IsOpen()) {
aSource.Close();
- return FALSE;
+ return sal_False;
}
ByteString sLine;
@@ -613,7 +613,7 @@ BOOL Export::ConvertLineEnds(
aSource.Close();
aDestination.Close();
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -623,7 +623,7 @@ ByteString Export::GetNativeFile( ByteString sSource )
DirEntry aTemp( GetTempFile());
ByteString sReturn( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US );
- for ( USHORT i = 0; i < 10; i++ )
+ for ( sal_uInt16 i = 0; i < 10; i++ )
if ( ConvertLineEnds( sSource, sReturn ))
return sReturn;
diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx
index 1ec9827a753d..67e736377c80 100644
--- a/l10ntools/source/gsicheck.cxx
+++ b/l10ntools/source/gsicheck.cxx
@@ -40,7 +40,7 @@
/*****************************************************************************/
void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
- ByteString aContext, BOOL bPrintContext, ULONG nLine, ByteString aUniqueId = ByteString() )
+ ByteString aContext, sal_Bool bPrintContext, sal_uIntPtr nLine, ByteString aUniqueId = ByteString() )
/*****************************************************************************/
{
fprintf( stdout, "%s %s, Line %lu", aType.GetBuffer(), aPrefix.GetBuffer(), nLine );
@@ -55,19 +55,19 @@ void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
/*****************************************************************************/
void PrintError( ByteString aMsg, ByteString aPrefix,
- ByteString aContext, BOOL bPrintContext, ULONG nLine, ByteString aUniqueId = ByteString() )
+ ByteString aContext, sal_Bool bPrintContext, sal_uIntPtr nLine, ByteString aUniqueId = ByteString() )
/*****************************************************************************/
{
PrintMessage( "Error:", aMsg, aPrefix, aContext, bPrintContext, nLine, aUniqueId );
}
-BOOL LanguageOK( ByteString aLang )
+sal_Bool LanguageOK( ByteString aLang )
{
if ( !aLang.Len() )
- return FALSE;
+ return sal_False;
if ( aLang.IsNumericAscii() )
- return TRUE;
+ return sal_True;
if ( aLang.GetTokenCount( '-' ) == 1 )
return aLang.IsAlphaAscii() && aLang.IsLowerAscii();
@@ -80,7 +80,7 @@ BOOL LanguageOK( ByteString aLang )
&& !aTok1.EqualsIgnoreCaseAscii( aTok0 );
}
- return FALSE;
+ return sal_False;
}
@@ -94,13 +94,13 @@ class LazySvFileStream : public SvFileStream
private:
String aFileName;
- BOOL bOpened;
+ sal_Bool bOpened;
StreamMode eOpenMode;
public:
LazySvFileStream()
: aFileName()
- , bOpened( FALSE )
+ , bOpened( sal_False )
, eOpenMode( 0 )
{};
@@ -123,7 +123,7 @@ void LazySvFileStream::LazyOpen()
fprintf( stderr, "\nERROR: Could not open Output-File %s!\n\n", ByteString( aFileName, RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
exit ( 4 );
}
- bOpened = TRUE;
+ bOpened = sal_True;
}
}
@@ -133,12 +133,12 @@ void LazySvFileStream::LazyOpen()
//
/*****************************************************************************/
-GSILine::GSILine( const ByteString &rLine, ULONG nLine )
+GSILine::GSILine( const ByteString &rLine, sal_uIntPtr nLine )
/*****************************************************************************/
: ByteString( rLine )
, nLineNumber( nLine )
- , bOK( TRUE )
- , bFixed ( FALSE )
+ , bOK( sal_True )
+ , bFixed ( sal_False )
{
if ( rLine.GetTokenCount( '\t' ) == 15 )
{
@@ -154,18 +154,18 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
// do some more format checks here
if ( !rLine.GetToken( 8, '\t' ).IsNumericAscii() )
{
- PrintError( "The length field does not contain a number!", "Line format", rLine.GetToken( 8, '\t' ), TRUE, GetLineNumber(), GetUniqId() );
+ PrintError( "The length field does not contain a number!", "Line format", rLine.GetToken( 8, '\t' ), sal_True, GetLineNumber(), GetUniqId() );
NotOK();
}
if ( !LanguageOK( aLangId ) )
{
- PrintError( "The Language is invalid!", "Line format", aLangId, TRUE, GetLineNumber(), GetUniqId() );
+ PrintError( "The Language is invalid!", "Line format", aLangId, sal_True, GetLineNumber(), GetUniqId() );
NotOK();
}
// limit GID and LID to MAX_GID_LID_LEN chars each for database conformity, see #137575#
if ( rLine.GetToken( 4, '\t' ).Len() > MAX_GID_LID_LEN || rLine.GetToken( 5, '\t' ).Len() > MAX_GID_LID_LEN )
{
- PrintError( ByteString("GID and LID may only be ").Append( ByteString::CreateFromInt32(MAX_GID_LID_LEN) ).Append( " chars long each!" ), "Line format", aLangId, TRUE, GetLineNumber(), GetUniqId() );
+ PrintError( ByteString("GID and LID may only be ").Append( ByteString::CreateFromInt32(MAX_GID_LID_LEN) ).Append( " chars long each!" ), "Line format", aLangId, sal_True, GetLineNumber(), GetUniqId() );
NotOK();
}
}
@@ -173,8 +173,8 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
{
aFormat = FORMAT_GSI;
ByteString sTmp( rLine );
- USHORT nPos = sTmp.Search( "($$)" );
- USHORT nStart = 0;
+ sal_uInt16 nPos = sTmp.Search( "($$)" );
+ sal_uInt16 nStart = 0;
if ( nPos != STRING_NOTFOUND )
{
aUniqId = sTmp.Copy( nStart, nPos - nStart );
@@ -214,7 +214,7 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
void GSILine::NotOK()
/*****************************************************************************/
{
- bOK = FALSE;
+ bOK = sal_False;
}
/*****************************************************************************/
@@ -224,7 +224,7 @@ void GSILine::ReassembleLine()
ByteString aReassemble;
if ( GetLineFormat() == FORMAT_SDF )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0 ; i < 10 ; i++ )
{
aReassemble.Append( GetToken( i, '\t' ) );
@@ -246,8 +246,8 @@ void GSILine::ReassembleLine()
}
else if ( GetLineFormat() == FORMAT_GSI )
{
- USHORT nPos = Search( "($$)" );
- USHORT nStart = 0;
+ sal_uInt16 nPos = Search( "($$)" );
+ sal_uInt16 nStart = 0;
if ( nPos != STRING_NOTFOUND )
{
nStart = nPos + 4; // + length of the delemiter
@@ -274,17 +274,17 @@ void GSILine::ReassembleLine()
*(ByteString*)this = aReassemble;
}
else
- PrintError( "Cannot reassemble GSI line (internal Error).", "Line format", "", FALSE, GetLineNumber(), GetUniqId() );
+ PrintError( "Cannot reassemble GSI line (internal Error).", "Line format", "", sal_False, GetLineNumber(), GetUniqId() );
}
else
- PrintError( "Cannot reassemble line of unknown type (internal Error).", "Line format", "", FALSE, GetLineNumber(), GetUniqId() );
+ PrintError( "Cannot reassemble line of unknown type (internal Error).", "Line format", "", sal_False, GetLineNumber(), GetUniqId() );
}
//
// class GSIBlock
//
/*****************************************************************************/
-GSIBlock::GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, BOOL bAllowKID, BOOL bAllowSusp )
+GSIBlock::GSIBlock( sal_Bool PbPrintContext, sal_Bool bSource, sal_Bool bTrans, sal_Bool bRef, sal_Bool bAllowKID, sal_Bool bAllowSusp )
/*****************************************************************************/
: pSourceLine( NULL )
, pReferenceLine( NULL )
@@ -294,7 +294,7 @@ GSIBlock::GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, B
, bReference( bRef )
, bAllowKeyIDs( bAllowKID )
, bAllowSuspicious( bAllowSusp )
- , bHasBlockError( FALSE )
+ , bHasBlockError( sal_False )
{
}
@@ -305,7 +305,7 @@ GSIBlock::~GSIBlock()
delete pSourceLine;
delete pReferenceLine;
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < Count(); i++ )
delete ( GetObject( i ));
}
@@ -318,7 +318,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
if ( pSourceLine )
{
PrintError( "Source Language entry double. Treating as Translation.", "File format", "", pLine->GetLineNumber(), pLine->GetUniqId() );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
pSourceLine->NotOK();
pLine->NotOK();
}
@@ -328,7 +328,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
return;
}
}
- ULONG nPos = 0;
+ sal_uIntPtr nPos = 0;
if ( aSourceLang.Len() ) // only check blockstructure if source lang is given
{
@@ -337,7 +337,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
if ( GetObject( nPos )->GetLanguageId().Equals( pLine->GetLanguageId() ) )
{
PrintError( "Translation Language entry double. Checking both.", "File format", "", pLine->GetLineNumber(), pLine->GetUniqId() );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
GetObject( nPos )->NotOK();
pLine->NotOK();
}
@@ -356,7 +356,7 @@ void GSIBlock::SetReferenceLine( GSILine* pLine )
/*****************************************************************************/
void GSIBlock::PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
- ByteString aContext, ULONG nLine, ByteString aUniqueId )
+ ByteString aContext, sal_uIntPtr nLine, ByteString aUniqueId )
/*****************************************************************************/
{
::PrintMessage( aType, aMsg, aPrefix, aContext, bPrintContext, nLine, aUniqueId );
@@ -364,7 +364,7 @@ void GSIBlock::PrintMessage( ByteString aType, ByteString aMsg, ByteString aPref
/*****************************************************************************/
void GSIBlock::PrintError( ByteString aMsg, ByteString aPrefix,
- ByteString aContext, ULONG nLine, ByteString aUniqueId )
+ ByteString aContext, sal_uIntPtr nLine, ByteString aUniqueId )
/*****************************************************************************/
{
PrintMessage( "Error:", aMsg, aPrefix, aContext, nLine, aUniqueId );
@@ -375,7 +375,7 @@ void GSIBlock::PrintList( ParserMessageList *pList, ByteString aPrefix,
GSILine *pLine )
/*****************************************************************************/
{
- ULONG i;
+ sal_uIntPtr i;
for ( i = 0 ; i < pList->Count() ; i++ )
{
ParserMessage *pMsg = pList->GetObject( i );
@@ -395,7 +395,7 @@ void GSIBlock::PrintList( ParserMessageList *pList, ByteString aPrefix,
}
/*****************************************************************************/
-BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorPos, ByteString &aErrorMsg, BOOL &bHasBeenFixed, ByteString &aFixed ) const
+sal_Bool GSIBlock::IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const
/*****************************************************************************/
{
String aUTF8Tester( aTestee, RTL_TEXTENCODING_UTF8 );
@@ -404,7 +404,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
aUTF8Tester = String( aTestee.GetBuffer(), nErrorPos, RTL_TEXTENCODING_UTF8 );
nErrorPos = aUTF8Tester.Len();
aErrorMsg = ByteString( "UTF8 Encoding seems to be broken" );
- return FALSE;
+ return sal_False;
}
nErrorPos = aUTF8Tester.SearchChar( String::CreateFromAscii( "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0b\x0c\x0e\x0f"
@@ -412,25 +412,25 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
if ( nErrorPos != STRING_NOTFOUND )
{
aErrorMsg = ByteString( "String contains illegal character" );
- return FALSE;
+ return sal_False;
}
if ( bFixTags )
{
- bHasBeenFixed = FALSE;
+ bHasBeenFixed = sal_False;
aFixed.Erase();
}
if ( !bAllowKeyIDs )
{
- BOOL bIsKeyID = FALSE;
- BOOL bNewId = FALSE;
+ sal_Bool bIsKeyID = sal_False;
+ sal_Bool bNewId = sal_False;
ByteString aID( aTestee );
- USHORT nAfterID = 0;
+ sal_uInt16 nAfterID = 0;
if ( aTestee.Equals( "{&", 0, 2 ) )
{ // check for strings from instset_native like "{&Tahoma8}335795.Installation Wiza ..."
- USHORT nTagEnd = aTestee.Search( '}' );
+ sal_uInt16 nTagEnd = aTestee.Search( '}' );
if ( nTagEnd != STRING_NOTFOUND )
{
if ( bFixTags )
@@ -445,7 +445,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
if ( aID.Equals( aDelimiter, 6, aDelimiter.Len() ) )
{ // New KeyId 6 Letters, digits and spechial chars followed by delimiter
- bNewId = TRUE;
+ bNewId = sal_True;
nErrorPos = 1;
aID = aID.Copy( 0, 6 );
nAfterID += 6;
@@ -453,7 +453,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
}
else if ( ( aID.GetChar(6) == '*' ) && aID.Equals( aDelimiter, 7, aDelimiter.Len() ) )
{ // New KeyId 6 Letters, digits and spechial chars followed by '*delimiter' to indicate translation in progress
- bNewId = TRUE;
+ bNewId = sal_True;
nErrorPos = 1;
aID = aID.Copy( 0, 6 );
nAfterID += 7;
@@ -461,7 +461,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
}
else if ( aID.GetTokenCount( '.' ) > 1 )
{ // test for old KeyIDs 5 to 6 digits followed by a dot '44373.'
- bNewId = FALSE;
+ bNewId = sal_False;
nErrorPos = 1;
aID = aID.GetToken( 0, '.' );
nAfterID = nAfterID + aID.Len();
@@ -475,12 +475,12 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
{
if ( aID.Len() == 6 )
{
- bIsKeyID = TRUE;
+ bIsKeyID = sal_True;
ByteString aDigits("0123456789abcdefghijklmnopqrstuvwxyz+-<=>");
- for ( USHORT i=0 ; i < aID.Len() ;i++ )
+ for ( sal_uInt16 i=0 ; i < aID.Len() ;i++ )
{
if ( aDigits.Search( aID.GetChar(i) ) == STRING_NOTFOUND )
- bIsKeyID = FALSE;
+ bIsKeyID = sal_False;
}
}
}
@@ -490,7 +490,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
aID.Erase( aID.Len()-1 );
if ( aID.IsNumericAscii() && aID.Len() >= 5 )
- bIsKeyID = TRUE;
+ bIsKeyID = sal_True;
}
if ( bIsKeyID )
@@ -499,32 +499,32 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
if ( bFixTags )
{
aFixed += aTestee.Copy( nAfterID );
- bHasBeenFixed = TRUE;
+ bHasBeenFixed = sal_True;
aErrorMsg = ByteString( "FIXED String containing KeyID" );
}
else
aErrorMsg = ByteString( "String contains KeyID" );
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
+sal_Bool GSIBlock::TestUTF8( GSILine* pTestee, sal_Bool bFixTags )
/*****************************************************************************/
{
- USHORT nErrorPos = 0;
+ sal_uInt16 nErrorPos = 0;
ByteString aErrorMsg;
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
ByteString aFixed;
- BOOL bHasBeenFixed = FALSE;
+ sal_Bool bHasBeenFixed = sal_False;
if ( !IsUTF8( pTestee->GetText(), bFixTags, nErrorPos, aErrorMsg, bHasBeenFixed, aFixed ) )
{
ByteString aContext( pTestee->GetText().Copy( nErrorPos, 20 ) );
PrintError( aErrorMsg.Append(" in Text at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
- bError = TRUE;
+ bError = sal_True;
if ( bHasBeenFixed )
{
pTestee->SetText( aFixed );
@@ -535,7 +535,7 @@ BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
{
ByteString aContext( pTestee->GetQuickHelpText().Copy( nErrorPos, 20 ) );
PrintError( aErrorMsg.Append(" in QuickHelpText at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
- bError = TRUE;
+ bError = sal_True;
if ( bHasBeenFixed )
{
pTestee->SetQuickHelpText( aFixed );
@@ -546,7 +546,7 @@ BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
{
ByteString aContext( pTestee->GetTitle().Copy( nErrorPos, 20 ) );
PrintError( aErrorMsg.Append(" in Title at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
- bError = TRUE;
+ bError = sal_True;
if ( bHasBeenFixed )
{
pTestee->SetTitle( aFixed );
@@ -560,38 +560,38 @@ BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
/*****************************************************************************/
-BOOL GSIBlock::HasSuspiciousChars( GSILine* pTestee, GSILine* pSource )
+sal_Bool GSIBlock::HasSuspiciousChars( GSILine* pTestee, GSILine* pSource )
/*****************************************************************************/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( !bAllowSuspicious && ( nPos = pTestee->GetText().Search("??")) != STRING_NOTFOUND )
if ( pSource->GetText().Search("??") == STRING_NOTFOUND )
{
String aUTF8Tester = String( pTestee->GetText(), 0, nPos, RTL_TEXTENCODING_UTF8 );
- USHORT nErrorPos = aUTF8Tester.Len();
+ sal_uInt16 nErrorPos = aUTF8Tester.Len();
ByteString aContext( pTestee->GetText().Copy( nPos, 20 ) );
PrintError( ByteString("Found double questionmark in translation only. Looks like an encoding problem at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
pTestee->NotOK();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
-BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags )
+sal_Bool GSIBlock::CheckSyntax( sal_uIntPtr nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags )
/*****************************************************************************/
{
static LingTest aTester;
- BOOL bHasError = FALSE;
+ sal_Bool bHasError = sal_False;
if ( !pSourceLine )
{
if ( bRequireSourceLine )
{
PrintError( "No source language entry defined!", "File format", "", nLine );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
}
}
else
@@ -601,7 +601,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
{
PrintList( pSourceLine->GetMessageList(), "ReferenceString", pSourceLine );
pSourceLine->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
}
}
if ( bReference )
@@ -617,7 +617,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
PrintError( "No reference line found. Entry is new in source file", "File format", "", pSource->GetLineNumber(), pSource->GetUniqId() );
else
PrintError( "No reference line found. Entry is new in source file", "File format", "", nLine );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
}
else
{
@@ -628,7 +628,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
aContext.Append( "\" --> \"" ).Append( pSourceLine->Copy( nPos - 5, 15) );
PrintError( "Source Language Entry has changed.", "File format", aContext, pSourceLine->GetLineNumber(), pSourceLine->GetUniqId() );
pSourceLine->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
}
}
}
@@ -636,7 +636,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
if ( pSourceLine )
bHasError |= !TestUTF8( pSourceLine, bFixTags );
- ULONG i;
+ sal_uIntPtr i;
for ( i = 0; i < Count(); i++ )
{
aTester.CheckTestee( GetObject( i ), pSourceLine != NULL, bFixTags );
@@ -644,7 +644,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
{
if ( GetObject( i )->HasMessages() || aTester.GetCompareWarnings().HasErrors() )
GetObject( i )->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
PrintList( GetObject( i )->GetMessageList(), "Translation", GetObject( i ) );
PrintList( &(aTester.GetCompareWarnings()), "Translation Tag Missmatch", GetObject( i ) );
}
@@ -656,19 +656,19 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
return bHasError || bHasBlockError;
}
-void GSIBlock::WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine )
+void GSIBlock::WriteError( LazySvFileStream &aErrOut, sal_Bool bRequireSourceLine )
{
if ( pSourceLine && pSourceLine->IsOK() && bCheckSourceLang && !bHasBlockError )
return;
- BOOL bHasError = FALSE;
- BOOL bCopyAll = ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) || bHasBlockError;
- ULONG i;
+ sal_Bool bHasError = sal_False;
+ sal_Bool bCopyAll = ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) || bHasBlockError;
+ sal_uIntPtr i;
for ( i = 0; i < Count(); i++ )
{
if ( !GetObject( i )->IsOK() || bCopyAll )
{
- bHasError = TRUE;
+ bHasError = sal_True;
aErrOut.LazyOpen();
aErrOut.WriteLine( *GetObject( i ) );
}
@@ -681,18 +681,18 @@ void GSIBlock::WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine )
}
}
-void GSIBlock::WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine )
+void GSIBlock::WriteCorrect( LazySvFileStream &aOkOut, sal_Bool bRequireSourceLine )
{
if ( ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) )
return;
- BOOL bHasOK = FALSE;
- ULONG i;
+ sal_Bool bHasOK = sal_False;
+ sal_uIntPtr i;
for ( i = 0; i < Count(); i++ )
{
if ( ( GetObject( i )->IsOK() || bCheckSourceLang ) && !bHasBlockError )
{
- bHasOK = TRUE;
+ bHasOK = sal_True;
aOkOut.LazyOpen();
aOkOut.WriteLine( *GetObject( i ) );
}
@@ -705,18 +705,18 @@ void GSIBlock::WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine )
}
}
-void GSIBlock::WriteFixed( LazySvFileStream &aFixOut, BOOL /*bRequireSourceLine*/ )
+void GSIBlock::WriteFixed( LazySvFileStream &aFixOut, sal_Bool /*bRequireSourceLine*/ )
{
if ( pSourceLine && !pSourceLine->IsFixed() && bCheckSourceLang )
return;
- BOOL bHasFixes = FALSE;
- ULONG i;
+ sal_Bool bHasFixes = sal_False;
+ sal_uIntPtr i;
for ( i = 0; i < Count(); i++ )
{
if ( GetObject( i )->IsFixed() )
{
- bHasFixes = TRUE;
+ bHasFixes = sal_True;
aFixOut.LazyOpen();
aFixOut.WriteLine( *GetObject( i ) );
}
@@ -785,31 +785,31 @@ int _cdecl main( int argc, char *argv[] )
/*****************************************************************************/
{
- BOOL bError = FALSE;
- BOOL bPrintContext = FALSE;
- BOOL bCheckSourceLang = FALSE;
- BOOL bCheckTranslationLang = FALSE;
- BOOL bWriteError = FALSE;
- BOOL bWriteCorrect = FALSE;
- BOOL bWriteFixed = FALSE;
- BOOL bFixTags = FALSE;
- BOOL bAllowKID = FALSE;
- BOOL bAllowSuspicious = FALSE;
+ sal_Bool bError = sal_False;
+ sal_Bool bPrintContext = sal_False;
+ sal_Bool bCheckSourceLang = sal_False;
+ sal_Bool bCheckTranslationLang = sal_False;
+ sal_Bool bWriteError = sal_False;
+ sal_Bool bWriteCorrect = sal_False;
+ sal_Bool bWriteFixed = sal_False;
+ sal_Bool bFixTags = sal_False;
+ sal_Bool bAllowKID = sal_False;
+ sal_Bool bAllowSuspicious = sal_False;
String aErrorFilename;
String aCorrectFilename;
String aFixedFilename;
- BOOL bFileHasError = FALSE;
+ sal_Bool bFileHasError = sal_False;
ByteString aSourceLang( "en-US" ); // English is default
ByteString aFilename;
ByteString aReferenceFilename;
- BOOL bReferenceFile = FALSE;
- for ( USHORT i = 1 ; i < argc ; i++ )
+ sal_Bool bReferenceFile = sal_False;
+ for ( sal_uInt16 i = 1 ; i < argc ; i++ )
{
if ( *argv[ i ] == '-' )
{
switch (*(argv[ i ]+1))
{
- case 'c':bPrintContext = TRUE;
+ case 'c':bPrintContext = sal_True;
break;
case 'w':
{
@@ -819,61 +819,61 @@ int _cdecl main( int argc, char *argv[] )
if ( (i+1) < argc )
{
aErrorFilename = String( argv[ i+1 ], RTL_TEXTENCODING_ASCII_US );
- bWriteError = TRUE;
+ bWriteError = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
else
- bWriteError = TRUE;
+ bWriteError = sal_True;
}
else if ( (*(argv[ i ]+2)) == 'c' )
if ( (*(argv[ i ]+3)) == 'f' )
if ( (i+1) < argc )
{
aCorrectFilename = String( argv[ i+1 ], RTL_TEXTENCODING_ASCII_US );
- bWriteCorrect = TRUE;
+ bWriteCorrect = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
else
- bWriteCorrect = TRUE;
+ bWriteCorrect = sal_True;
else if ( (*(argv[ i ]+2)) == 'f' )
if ( (*(argv[ i ]+3)) == 'f' )
if ( (i+1) < argc )
{
aFixedFilename = String( argv[ i+1 ], RTL_TEXTENCODING_ASCII_US );
- bWriteFixed = TRUE;
- bFixTags = TRUE;
+ bWriteFixed = sal_True;
+ bFixTags = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
else
{
- bWriteFixed = TRUE;
- bFixTags = TRUE;
+ bWriteFixed = sal_True;
+ bFixTags = sal_True;
}
else
{
fprintf( stderr, "\nERROR: Unknown Switch %s!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
break;
- case 's':bCheckSourceLang = TRUE;
+ case 's':bCheckSourceLang = sal_True;
break;
- case 't':bCheckTranslationLang = TRUE;
+ case 't':bCheckTranslationLang = sal_True;
break;
case 'l':
{
@@ -887,7 +887,7 @@ int _cdecl main( int argc, char *argv[] )
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
break;
@@ -896,34 +896,34 @@ int _cdecl main( int argc, char *argv[] )
if ( (i+1) < argc )
{
aReferenceFilename = argv[ i+1 ];
- bReferenceFile = TRUE;
+ bReferenceFile = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
break;
case 'f':
{
- bFixTags = TRUE;
+ bFixTags = sal_True;
}
break;
case 'k':
{
- bAllowKID = TRUE;
+ bAllowKID = sal_True;
}
break;
case 'e':
{
- bAllowSuspicious = TRUE;
+ bAllowSuspicious = sal_True;
}
break;
default:
fprintf( stderr, "\nERROR: Unknown Switch %s!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
else
@@ -933,7 +933,7 @@ int _cdecl main( int argc, char *argv[] )
else
{
fprintf( stderr, "\nERROR: Only one filename may be specified!\n\n");
- bError = TRUE;
+ bError = sal_True;
}
}
}
@@ -1033,20 +1033,20 @@ int _cdecl main( int argc, char *argv[] )
ByteString sReferenceLine;
GSILine* pReferenceLine = NULL;
ByteString aOldReferenceId("No Valid ID"); // just set to something which can never be an ID
- ULONG nReferenceLine = 0;
+ sal_uIntPtr nReferenceLine = 0;
ByteString sGSILine;
GSILine* pGSILine = NULL;
ByteString aOldId("No Valid ID"); // just set to something which can never be an ID
GSIBlock *pBlock = NULL;
- ULONG nLine = 0;
+ sal_uIntPtr nLine = 0;
while ( !aGSI.IsEof() )
{
aGSI.ReadLine( sGSILine );
nLine++;
pGSILine = new GSILine( sGSILine, nLine );
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if ( pGSILine->Len() )
@@ -1057,7 +1057,7 @@ int _cdecl main( int argc, char *argv[] )
pGSILine->NotOK();
if ( bWriteError )
{
- bFileHasError = TRUE;
+ bFileHasError = sal_True;
aErrOut.LazyOpen();
aErrOut.WriteLine( *pGSILine );
}
@@ -1096,7 +1096,7 @@ int _cdecl main( int argc, char *argv[] )
// find corresponding line in reference file
if ( bReferenceFile )
{
- BOOL bContinueSearching = TRUE;
+ sal_Bool bContinueSearching = sal_True;
while ( ( !aReferenceGSI.IsEof() || pReferenceLine ) && bContinueSearching )
{
if ( !pReferenceLine )
@@ -1116,7 +1116,7 @@ int _cdecl main( int argc, char *argv[] )
{
// if ( pGSILine->GetLanguageId() == aSourceLang )
// PrintError( "No reference line found. Entry is new in source file", "File format", "", bPrintContext, pGSILine->GetLineNumber(), aId );
- bContinueSearching = FALSE;
+ bContinueSearching = sal_False;
}
else
{
@@ -1138,7 +1138,7 @@ int _cdecl main( int argc, char *argv[] )
}
pBlock->InsertLine( pGSILine, aSourceLang );
- bDelete = FALSE;
+ bDelete = sal_False;
}
}
if ( bDelete )
diff --git a/l10ntools/source/gsiconv.cxx b/l10ntools/source/gsiconv.cxx
index b2e470f604ea..64ec6e38af5b 100644
--- a/l10ntools/source/gsiconv.cxx
+++ b/l10ntools/source/gsiconv.cxx
@@ -39,12 +39,12 @@
#define GSI_FILE_L10NFRAMEWORK 0x0002
/*****************************************************************************/
-USHORT GetGSIFileType( SvStream &rStream )
+sal_uInt16 GetGSIFileType( SvStream &rStream )
/*****************************************************************************/
{
- USHORT nFileType = GSI_FILE_UNKNOWN;
+ sal_uInt16 nFileType = GSI_FILE_UNKNOWN;
- ULONG nPos( rStream.Tell());
+ sal_uIntPtr nPos( rStream.Tell());
rStream.Seek( STREAM_SEEK_TO_BEGIN );
ByteString sLine;
@@ -64,7 +64,7 @@ USHORT GetGSIFileType( SvStream &rStream )
}
/*****************************************************************************/
-ByteString GetGSILineId( const ByteString &rLine, USHORT nFileType )
+ByteString GetGSILineId( const ByteString &rLine, sal_uInt16 nFileType )
/*****************************************************************************/
{
ByteString sId;
@@ -89,7 +89,7 @@ ByteString GetGSILineId( const ByteString &rLine, USHORT nFileType )
}
/*****************************************************************************/
-ByteString GetGSILineLangId( const ByteString &rLine, USHORT nFileType )
+ByteString GetGSILineLangId( const ByteString &rLine, sal_uInt16 nFileType )
/*****************************************************************************/
{
ByteString sLangId;
@@ -108,8 +108,8 @@ ByteString GetGSILineLangId( const ByteString &rLine, USHORT nFileType )
}
/*****************************************************************************/
-void ConvertGSILine( BOOL bToUTF8, ByteString &rLine,
- rtl_TextEncoding nEncoding, USHORT nFileType )
+void ConvertGSILine( sal_Bool bToUTF8, ByteString &rLine,
+ rtl_TextEncoding nEncoding, sal_uInt16 nFileType )
/*****************************************************************************/
{
switch ( nFileType ) {
@@ -122,7 +122,7 @@ void ConvertGSILine( BOOL bToUTF8, ByteString &rLine,
case GSI_FILE_L10NFRAMEWORK: {
ByteString sConverted;
- for ( USHORT i = 0; i < rLine.GetTokenCount( '\t' ); i++ ) {
+ for ( sal_uInt16 i = 0; i < rLine.GetTokenCount( '\t' ); i++ ) {
ByteString sToken = rLine.GetToken( i, '\t' );
if (( i > 9 ) && ( i < 14 )) {
if( bToUTF8 )
@@ -231,9 +231,9 @@ int _cdecl main( int argc, char *argv[] )
exit ( 3 );
}
- USHORT nFileType( GetGSIFileType( aGSI ));
+ sal_uInt16 nFileType( GetGSIFileType( aGSI ));
- ULONG nMaxLines = (ULONG) ByteString( argv[ 2 ] ).ToInt64();
+ sal_uIntPtr nMaxLines = (sal_uIntPtr) ByteString( argv[ 2 ] ).ToInt64();
if ( !nMaxLines ) {
fprintf( stderr, "\nERROR: Linecount must be at least 1!\n\n" );
exit ( 3 );
@@ -241,8 +241,8 @@ int _cdecl main( int argc, char *argv[] )
ByteString sGSILine;
ByteString sOldId;
- ULONG nLine = 0;
- ULONG nOutputFile = 1;
+ sal_uIntPtr nLine = 0;
+ sal_uIntPtr nOutputFile = 1;
String sOutput( sBase );
sOutput += String( "_", RTL_TEXTENCODING_ASCII_US );
@@ -345,7 +345,7 @@ int _cdecl main( int argc, char *argv[] )
fprintf( stderr, "\nERROR: Could not open GSI-File %s!\n\n", ByteString( argv[ 3 ] ).GetBuffer());
exit ( 3 );
}
- USHORT nFileType( GetGSIFileType( aGSI ));
+ sal_uInt16 nFileType( GetGSIFileType( aGSI ));
ByteString sGSILine;
while ( !aGSI.IsEof()) {
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index 49a59266a85d..e185b77cad54 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -51,10 +51,10 @@
// set of global variables
ByteString sInputFile;
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bUTF8;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sOutputFile;
@@ -64,21 +64,21 @@ ByteString sSDFFile;
bool bQuiet;
/*****************************************************************************/
-BOOL ParseCommandLine( int argc, char* argv[])
+sal_Bool ParseCommandLine( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
bQuiet = false;
Export::sLanguages = "";
Export::sForcedLanguages = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -109,18 +109,18 @@ BOOL ParseCommandLine( int argc, char* argv[])
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-QQ" ) {
bQuiet = true;
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-L" ) {
nState = STATE_LANGUAGES;
@@ -128,12 +128,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
else {
switch ( nState ) {
case STATE_NON: {
- return FALSE; // no valid command line
+ return sal_False; // no valid command line
}
//break;
case STATE_INPUT: {
sInputFile = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -159,7 +159,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
break;
case STATE_SDFFILE: {
sSDFFile = argv[ i ];
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -175,12 +175,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
- return TRUE;
+ bEnableExport = sal_True;
+ return sal_True;
}
// command line is not valid
- return FALSE;
+ return sal_False;
}
@@ -233,8 +233,8 @@ int _cdecl main( int argc, char *argv[] )
{
//sal_uInt64 startreadloc = Export::startMessure();
- MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252 );
- //MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
+ MergeDataFile aMergeDataFile( sSDFFile, sInputFile , sal_False, RTL_TEXTENCODING_MS_1252 );
+ //MergeDataFile aMergeDataFile( sSDFFile, sInputFile , sal_False, RTL_TEXTENCODING_MS_1252, false );
//Export::stopMessure( ByteString("read localize.sdf") , startreadloc );
hasNoError = aParser.Merge( sSDFFile, sOutputFile , Export::sLanguages , aMergeDataFile );
@@ -266,8 +266,8 @@ int _cdecl main( int argc, char *argv[] )
aFStream.close();
ByteString sHelpFile(""); // dummy
- //MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
- MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252 );
+ //MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , sal_False, RTL_TEXTENCODING_MS_1252, false );
+ MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , sal_False, RTL_TEXTENCODING_MS_1252 );
//aMergeDataFile.Dump();
std::vector<ByteString> aLanguages;
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 0ab7e6eb5c2e..8fb40c329e59 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -271,7 +271,7 @@ bool HelpParser::CreateSDF(
DirEntry aTempFile( sUsedTempFile );
aTempFile.Kill();
}
- return TRUE;
+ return sal_True;
}
ByteString HelpParser::makeAbsolutePath( const ByteString& sHelpFile , const ByteString& rRoot_in )
@@ -585,9 +585,9 @@ void HelpParser::MakeDir( const ByteString& sPath ){
ByteString sTPath( sPath );
ByteString sDelimiter( DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
sTPath.SearchAndReplaceAll( sDelimiter , '/' );
- USHORT cnt = sTPath.GetTokenCount( '/' );
+ sal_uInt16 cnt = sTPath.GetTokenCount( '/' );
ByteString sCreateDir;
- for( USHORT i = 0 ; i < cnt ; i++ )
+ for( sal_uInt16 i = 0 ; i < cnt ; i++ )
{
sCreateDir += sTPath.GetToken( i , '/' );
sCreateDir += sDelimiter;
diff --git a/l10ntools/source/lngex.cxx b/l10ntools/source/lngex.cxx
index c593b85d4932..4b9a3683ff47 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -48,11 +48,11 @@
// set of global variables
ByteString sInputFile;
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bUTF8;
-BOOL bULF; // ULF = Unicode Language File
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bUTF8;
+sal_Bool bULF; // ULF = Unicode Language File
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -60,21 +60,21 @@ ByteString sOutputFile;
ByteString sMergeSrc;
/*****************************************************************************/
-BOOL ParseCommandLine( int argc, char* argv[])
+sal_Bool ParseCommandLine( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bUTF8 = TRUE;
- bULF = FALSE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bUTF8 = sal_True;
+ bULF = sal_False;
bQuiet = false;
sPrj = "";
sPrjRoot = "";
Export::sLanguages = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -100,19 +100,19 @@ BOOL ParseCommandLine( int argc, char* argv[])
}
else if ( sSwitch == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( sSwitch == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
/* else if ( sSwitch == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}*/
/* else if ( sSwitch == "-ULF" ) {
nState = STATE_ULF;
- bULF = TRUE;
+ bULF = sal_True;
}*/
else if ( sSwitch == "-L" ) {
nState = STATE_LANGUAGES;
@@ -120,12 +120,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
else {
switch ( nState ) {
case STATE_NON: {
- return FALSE; // no valid command line
+ return sal_False; // no valid command line
}
//break;
case STATE_INPUT: {
sInputFile = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -143,7 +143,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = argv[ i ];
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -156,13 +156,13 @@ BOOL ParseCommandLine( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bULF = TRUE;
- bEnableExport = TRUE;
- return TRUE;
+ bULF = sal_True;
+ bEnableExport = sal_True;
+ return sal_True;
}
// command line is not valid
- return FALSE;
+ return sal_False;
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 5f40a4346f53..36d0eace00d0 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -38,7 +38,7 @@ using namespace std;
// class LngParser
//
/*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat , bool bQuiet_in )
+LngParser::LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat , bool bQuiet_in )
/*****************************************************************************/
:
nError( LNG_OK ),
@@ -77,7 +77,7 @@ LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat ,
LngParser::~LngParser()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pLines->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pLines->Count(); i++ )
delete pLines->GetObject( i );
delete pLines;
}
@@ -100,7 +100,7 @@ void LngParser::FillInFallbacks( ByteStringHashMap Text )
}
/*****************************************************************************/
-BOOL LngParser::CreateSDF(
+sal_Bool LngParser::CreateSDF(
const ByteString &rSDFFile, const ByteString &rPrj,
const ByteString &rRoot )
/*****************************************************************************/
@@ -125,8 +125,8 @@ BOOL LngParser::CreateSDF(
sFullEntry.Copy( sPrjEntry.Len() + 1 ), gsl_getSystemTextEncoding());
sActFileName.SearchAndReplaceAll( "/", "\\" );
- ULONG nPos = 0;
- BOOL bStart = true;
+ sal_uIntPtr nPos = 0;
+ sal_Bool bStart = true;
ByteString sGroup;
ByteStringHashMap Text;
ByteString sID;
@@ -157,7 +157,7 @@ BOOL LngParser::CreateSDF(
const ByteString &sActFileName , const ByteString &sID )
{
- BOOL bExport = true;
+ sal_Bool bExport = true;
if ( bExport ) {
ByteString sTimeStamp( Export::GetTimeStamp());
ByteString sCur;
@@ -205,7 +205,7 @@ BOOL LngParser::CreateSDF(
}
/*****************************************************************************/
-BOOL LngParser::Merge(
+sal_Bool LngParser::Merge(
const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString& rPrj )
/*****************************************************************************/
{
@@ -218,16 +218,16 @@ BOOL LngParser::Merge(
nError = LNG_COULD_NOT_OPEN;
}
nError = LNG_OK;
-// MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, BOOL bUTF8 );
+// MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, sal_Bool bUTF8 );
- MergeDataFile aMergeDataFile( rSDFFile, sSource , FALSE, RTL_TEXTENCODING_MS_1252);//, bDBIsUTF8 );
+ MergeDataFile aMergeDataFile( rSDFFile, sSource , sal_False, RTL_TEXTENCODING_MS_1252);//, bDBIsUTF8 );
ByteString sTmp( Export::sLanguages );
if( sTmp.ToUpperAscii().Equals("ALL") )
Export::SetLanguages( aMergeDataFile.GetLanguages() );
aLanguages = Export::GetLanguages();
- ULONG nPos = 0;
- BOOL bGroup = FALSE;
+ sal_uIntPtr nPos = 0;
+ sal_Bool bGroup = sal_False;
ByteString sGroup;
// seek to next group
@@ -241,7 +241,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
}
nPos ++;
}
@@ -249,13 +249,13 @@ BOOL LngParser::Merge(
while ( nPos < pLines->Count()) {
ByteStringHashMap Text;
ByteString sID( sGroup );
- ULONG nLastLangPos = 0;
+ sal_uIntPtr nLastLangPos = 0;
ResData *pResData = new ResData( "", sID , sSource );
pResData->sResTyp = "LngText";
PFormEntrys *pEntrys = aMergeDataFile.GetPFormEntrys( pResData );
// read languages
- bGroup = FALSE;
+ bGroup = sal_False;
ByteString sLanguagesDone;
@@ -269,7 +269,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
nPos ++;
sLanguagesDone = "";
}
@@ -291,7 +291,7 @@ BOOL LngParser::Merge(
ByteString sText = sLine.GetToken( 1, '\"' ).GetToken( 0, '\"' );
if( sLang.Len() ){
ByteString sNewText;
- pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, TRUE );
+ pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True );
if ( sNewText.Len()) {
ByteString *pLine = pLines->GetObject( nPos );
@@ -327,7 +327,7 @@ BOOL LngParser::Merge(
!sCur.EqualsIgnoreCaseAscii("en-US") && !Text[ sCur ].Len() && pEntrys ){
ByteString sNewText;
- pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, TRUE );
+ pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, sal_True );
if (( sNewText.Len()) &&
!(( sCur.Equals("x-comment") ) && ( sNewText == "-" )))
{
@@ -349,9 +349,9 @@ BOOL LngParser::Merge(
delete pResData;
}
- for ( ULONG i = 0; i < pLines->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pLines->Count(); i++ )
aDestination.WriteLine( *pLines->GetObject( i ));
aDestination.Close();
- return TRUE;
+ return sal_True;
}
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 1d1428ff2dc0..82c888889460 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -131,7 +131,7 @@ class SourceTreeLocalizer : public SourceTreeIterator
{
private:
SvFileStream aSDF;
- USHORT nMode;
+ sal_uInt16 nMode;
ByteString sLanguageRestriction;
@@ -140,12 +140,12 @@ private:
int nFileCnt;
- const ByteString GetProjectName( BOOL bAbs = FALSE );
+ const ByteString GetProjectName( sal_Bool bAbs = sal_False );
const ByteString GetProjectRootRel();
- BOOL CheckNegativeList( const ByteString &rFileName );
- BOOL CheckPositiveList( const ByteString &rFileName );
+ sal_Bool CheckNegativeList( const ByteString &rFileName );
+ sal_Bool CheckPositiveList( const ByteString &rFileName );
void WorkOnFile(
const ByteString &rFileName,
@@ -161,8 +161,8 @@ private:
const ByteString &rCollectMode
);
void WorkOnDirectory( const ByteString &rDirectory );
- BOOL ExecuteMerge();
- BOOL MergeSingleFile(
+ sal_Bool ExecuteMerge();
+ sal_Bool MergeSingleFile(
const ByteString &rPrj,
const ByteString &rFile,
const ByteString &rSDFFile
@@ -177,8 +177,8 @@ public:
void SetLanguageRestriction( const ByteString& rRestrictions )
{ sLanguageRestriction = rRestrictions; }
int getFileCnt();
- BOOL Extract( const ByteString &rDestinationFile );
- BOOL Merge( const ByteString &rSourceFile , const ByteString &rOutput );
+ sal_Bool Extract( const ByteString &rDestinationFile );
+ sal_Bool Merge( const ByteString &rSourceFile , const ByteString &rOutput );
int GetFileCnt();
virtual void OnExecuteDirectory( const rtl::OUString &rDirectory );
};
@@ -202,10 +202,10 @@ SourceTreeLocalizer::~SourceTreeLocalizer()
}
/*****************************************************************************/
-const ByteString SourceTreeLocalizer::GetProjectName( BOOL bAbs )
+const ByteString SourceTreeLocalizer::GetProjectName( sal_Bool bAbs )
/*****************************************************************************/
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
DirEntry aCur;
aCur.ToAbs();
@@ -233,7 +233,7 @@ int SourceTreeLocalizer::GetFileCnt(){
const ByteString SourceTreeLocalizer::GetProjectRootRel()
/*****************************************************************************/
{
- ByteString sProjectRoot( GetProjectName( TRUE ));
+ ByteString sProjectRoot( GetProjectName( sal_True ));
DirEntry aCur;
aCur.ToAbs();
ByteString sCur( aCur.GetFull(), RTL_TEXTENCODING_ASCII_US );
@@ -246,10 +246,10 @@ const ByteString SourceTreeLocalizer::GetProjectRootRel()
sCur.SearchAndReplaceAll( sDelimiter, "/" );
sCur.EraseLeadingChars( '/' );
- ULONG nCount = sCur.GetTokenCount( '/' );
+ sal_uIntPtr nCount = sCur.GetTokenCount( '/' );
ByteString sProjectRootRel;
- for ( ULONG i = 0; i < nCount; i++ ) {
+ for ( sal_uIntPtr i = 0; i < nCount; i++ ) {
if ( sProjectRootRel.Len())
sProjectRootRel += sDelimiter;
sProjectRootRel += "..";
@@ -365,11 +365,11 @@ ByteString SourceTreeLocalizer::getSourceLanguages( ByteString sLanguageRestrict
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
+sal_Bool SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
/*****************************************************************************/
{
- ULONG nIndex = 0;
- BOOL bReturn = TRUE;
+ sal_uIntPtr nIndex = 0;
+ sal_Bool bReturn = sal_True;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -384,7 +384,7 @@ BOOL SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
sNegative.ToLowerAscii();
if( sFileName.Search( sNegative ) == sFileName.Len() - sNegative.Len())
- bReturn = FALSE;
+ bReturn = sal_False;
nIndex++;
sNegative = NegativeList[ nIndex ];
@@ -394,11 +394,11 @@ BOOL SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
+sal_Bool SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
/*****************************************************************************/
{
- ULONG nIndex = 0;
- BOOL bReturn = FALSE;
+ sal_uIntPtr nIndex = 0;
+ sal_Bool bReturn = sal_False;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -413,7 +413,7 @@ BOOL SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
sNegative.ToLowerAscii();
if( sFileName.Search( sNegative ) == sFileName.Len() - sNegative.Len())
- bReturn = TRUE;
+ bReturn = sal_True;
nIndex++;
sNegative = PositiveList[ nIndex ];
@@ -438,11 +438,11 @@ void SourceTreeLocalizer::WorkOnFileType(
DirEntry aEntry( sWild );
Dir aDir( sWild, FSYS_KIND_FILE );
- for ( USHORT i = 0; i < aDir.Count(); i++ ) {
+ for ( sal_uInt16 i = 0; i < aDir.Count(); i++ ) {
DirEntry aFile( aDir[ i ] );
ByteString sFile( aFile.GetFull(), RTL_TEXTENCODING_ASCII_US );
- BOOL bAllowed = TRUE;
+ sal_Bool bAllowed = sal_True;
if ( rCollectMode.Equals( "negative" ))
bAllowed = CheckNegativeList( sFile );
@@ -459,7 +459,7 @@ void SourceTreeLocalizer::WorkOnDirectory( const ByteString &rDirectory )
/*****************************************************************************/
{
//printf("Working on Directory %s\n",rDirectory.GetBuffer());
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
ByteString sExtension( ExeTable[ nIndex ][ 0 ] );
ByteString sExecutable( ExeTable[ nIndex ][ 1 ] );
ByteString sParameter( ExeTable[ nIndex ][ 2 ] );
@@ -494,7 +494,7 @@ void SourceTreeLocalizer::OnExecuteDirectory( const rtl::OUString &aDirectory )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
+sal_Bool SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
/*****************************************************************************/
{
nMode = LOCALIZE_EXTRACT;
@@ -502,7 +502,7 @@ BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
aSDF.Open( String( rDestinationFile , RTL_TEXTENCODING_ASCII_US ) , STREAM_STD_WRITE );
aSDF.SetLineDelimiter( LINEEND_CRLF );
- BOOL bReturn = aSDF.IsOpen();
+ sal_Bool bReturn = aSDF.IsOpen();
if ( bReturn ) {
aSDF.Seek( STREAM_SEEK_TO_END );
bReturn = StartExecute();
@@ -517,7 +517,7 @@ BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::MergeSingleFile(
+sal_Bool SourceTreeLocalizer::MergeSingleFile(
const ByteString &rPrj,
const ByteString &rFile,
const ByteString &rSDFFile
@@ -526,7 +526,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
{
//printf("MergeSingleFile(%s,%s,%s)",rPrj.GetBuffer(),rFile.GetBuffer(),rSDFFile.GetBuffer());
if ( !rFile.Len())
- return TRUE;
+ return sal_True;
ByteString sRoot( Export::GetEnv( "SRC_ROOT" ));
DirEntry aEntry( String( sRoot, RTL_TEXTENCODING_ASCII_US ));
@@ -545,7 +545,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
if( !bQuiet2 ) fprintf( stdout, "##### %s #####\n", sBCur.GetBuffer());
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
ByteString sCandidate( ExeTable[ nIndex ][ 0 ] );
@@ -557,18 +557,18 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
DirEntryKind theDir=FSYS_KIND_FILE;
Dir myDir( aEntry.GetPath(), theDir);
DirEntry current;
- BOOL found=FALSE;
- for( USHORT x=0; x < myDir.Count() && !found;){
+ sal_Bool found=sal_False;
+ for( sal_uInt16 x=0; x < myDir.Count() && !found;){
current=myDir[x++];
StringCompare result=current.GetName().CompareIgnoreCaseToAscii( aEntry.GetName() );
if( result==COMPARE_EQUAL ){
fprintf(stderr,"WARNING: %s not found\n", ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US).GetBuffer() );
fprintf(stderr,"but use %s instead \n" , ByteString(current.GetFull(), RTL_TEXTENCODING_ASCII_US).GetBuffer() );
aEntry=current;
- found=TRUE;
+ found=sal_True;
}
}
- if(!found) return TRUE;
+ if(!found) return sal_True;
}
@@ -611,7 +611,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
sOutput.GetBuffer());
}
else {
- FileStat::SetReadOnlyFlag( aEntry, FALSE );
+ FileStat::SetReadOnlyFlag( aEntry, sal_False );
String myStr2(aEntry.GetFull());
String aTemp22 = String::CreateFromAscii("_tmp");
myStr2.Append(aTemp22);
@@ -656,14 +656,14 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
aOut.Kill();
} // else
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::ExecuteMerge( )
+sal_Bool SourceTreeLocalizer::ExecuteMerge( )
/*****************************************************************************/
{
DirEntry aEntry( Export::GetTempFile());
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
bool bMerged = false;
ByteString sFileName;
@@ -725,18 +725,18 @@ BOOL SourceTreeLocalizer::ExecuteMerge( )
// Test
if( bLocal ){
- USHORT nPos = sFile.SearchBackward( '\\' );
+ sal_uInt16 nPos = sFile.SearchBackward( '\\' );
ByteString sTmp = sFile.Copy( nPos+1 , sFile.Len()-nPos-1 );
//printf("'%s'='%s'\n",sTmp.GetBuffer(), sOutputFileName.GetBuffer());
if( sTmp.CompareTo(sOutputFileName) == COMPARE_EQUAL ){
bMerged = true;
if ( !MergeSingleFile( sPrj, sFile, sSDFFile ))
- bReturn = FALSE;
+ bReturn = sal_False;
}else{
bMerged = true;
//printf("MergeSingleFile('%s','%s','%s')\n",sPrj.GetBuffer(),sFile.GetBuffer(),sSDFFile.GetBuffer());
if ( !MergeSingleFile( sPrj, sFile, sSDFFile ))
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
}
@@ -755,7 +755,7 @@ BOOL SourceTreeLocalizer::ExecuteMerge( )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::Merge( const ByteString &rSourceFile , const ByteString &rOutput )
+sal_Bool SourceTreeLocalizer::Merge( const ByteString &rSourceFile , const ByteString &rOutput )
/*****************************************************************************/
{
sOutputFile = rOutput;
@@ -763,7 +763,7 @@ BOOL SourceTreeLocalizer::Merge( const ByteString &rSourceFile , const ByteStrin
aSDF.Open( String( rSourceFile, RTL_TEXTENCODING_ASCII_US ),
STREAM_STD_READ );
- BOOL bReturn = aSDF.IsOpen();
+ sal_Bool bReturn = aSDF.IsOpen();
if ( bReturn ) {
bReturn = ExecuteMerge();
// aSDF.Close();
@@ -821,7 +821,7 @@ int Error()
}
/*****************************************************************************/
-BOOL CheckLanguages( ByteString &rLanguages )
+sal_Bool CheckLanguages( ByteString &rLanguages )
/*****************************************************************************/
{
ByteString sTmp( rLanguages );
@@ -838,10 +838,10 @@ int _cdecl main( int argc, char *argv[] )
{
String sTempBase( String::CreateFromAscii( "loc" ));
DirEntry::SetTempNameBase( sTempBase );
- USHORT nState = STATE_NONE;
+ sal_uInt16 nState = STATE_NONE;
- BOOL bExport = FALSE;
- BOOL bMerge = FALSE;
+ sal_Bool bExport = sal_False;
+ sal_Bool bMerge = sal_False;
bool bQuiet = false;
bool bQuiet2 = false;
bool bSkipLinks = false;
@@ -851,7 +851,7 @@ int _cdecl main( int argc, char *argv[] )
ByteString sOutput;
bQuiet2 = true;
- bExport = TRUE;
+ bExport = sal_True;
for( int i = 1; i < argc; i++ ) {
ByteString sSwitch( argv[ i ] );
@@ -861,7 +861,7 @@ int _cdecl main( int argc, char *argv[] )
nState = STATE_EXPORT;
if ( bMerge )
return Error();
- bExport = TRUE;
+ bExport = sal_True;
}
else if( sSwitch.Equals( "-Q" )) {
bQuiet = true;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e15a5c8a28fa..e9ff3233c274 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -50,12 +50,12 @@ ByteString PFormEntrys::Dump(){
return sRet;
}
-BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
- USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+sal_Bool PFormEntrys::GetTransex3Text( ByteString &rReturn,
+ sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel )
{
- BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel );
+ sal_Bool rc = GetText( rReturn , nTyp , nLangIndex , bDel );
ByteString test( rReturn );
- for( USHORT idx = 0; idx < rReturn.Len(); idx++ )
+ for( sal_uInt16 idx = 0; idx < rReturn.Len(); idx++ )
{
if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' )
{
@@ -67,8 +67,8 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
return rc;
}
/*****************************************************************************/
-BOOL PFormEntrys::GetText( ByteString &rReturn,
- USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+sal_Bool PFormEntrys::GetText( ByteString &rReturn,
+ sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel )
/*****************************************************************************/
{
@@ -84,14 +84,14 @@ BOOL PFormEntrys::GetText( ByteString &rReturn,
// DEBUG******************
*/
- BOOL bReturn=TRUE;
+ sal_Bool bReturn=sal_True;
switch ( nTyp ) {
case STRING_TYP_TEXT :
rReturn = sText[ nLangIndex ];
if ( bDel )
sText[ nLangIndex ] = "";
bReturn = bTextFirst[ nLangIndex ];
- bTextFirst[ nLangIndex ] = FALSE;
+ bTextFirst[ nLangIndex ] = sal_False;
break;
case STRING_TYP_HELPTEXT :
rReturn = sHelpText;
@@ -101,14 +101,14 @@ BOOL PFormEntrys::GetText( ByteString &rReturn,
if ( bDel )
sQuickHelpText[ nLangIndex ] = "";
bReturn = bQuickHelpTextFirst[ nLangIndex ];
- bQuickHelpTextFirst[ nLangIndex ] = FALSE;
+ bQuickHelpTextFirst[ nLangIndex ] = sal_False;
break;
case STRING_TYP_TITLE :
rReturn = sTitle[ nLangIndex ];
if ( bDel )
sTitle[ nLangIndex ] = "";
bReturn = bTitleFirst[ nLangIndex ];
- bTitleFirst[ nLangIndex ] = FALSE;
+ bTitleFirst[ nLangIndex ] = sal_False;
break;
}
//printf("Returning '%s'\n",rReturn.GetBuffer());
@@ -180,7 +180,7 @@ PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm )
}
/*****************************************************************************/
-BOOL MergeData::operator==( ResData *pData )
+sal_Bool MergeData::operator==( ResData *pData )
/*****************************************************************************/
{
ByteString sResTyp_upper( pData->sResTyp );
@@ -203,8 +203,8 @@ BOOL MergeData::operator==( ResData *pData )
#define FFORMAT_OLD 0x0002
/*****************************************************************************/
-MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFile ,BOOL bErrLog,
-// CharSet aCharSet, BOOL bUTF8 , bool bCaseSensitive )
+MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFile ,sal_Bool bErrLog,
+// CharSet aCharSet, sal_Bool bUTF8 , bool bCaseSensitive )
CharSet aCharSet, bool bCaseSensitive )
/*****************************************************************************/
@@ -400,7 +400,7 @@ void MergeDataFile::InsertEntry(
/*****************************************************************************/
{
MergeData *pData;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
// uniquify the filename to save memory.
ByteStringHashMap::const_iterator fit = aFilenames.find (rInFilename);
@@ -423,7 +423,7 @@ void MergeDataFile::InsertEntry(
aMap.insert( MergeDataHashMap::value_type( sKey, pData ) );
}
- bFound = FALSE;
+ bFound = sal_False;
PFormEntrys *pFEntrys = 0;
// search for PFormEntrys
diff --git a/l10ntools/source/srciter.cxx b/l10ntools/source/srciter.cxx
index e928a244efe6..4e87fda3e079 100644
--- a/l10ntools/source/srciter.cxx
+++ b/l10ntools/source/srciter.cxx
@@ -40,7 +40,7 @@
SourceTreeIterator::SourceTreeIterator(
const ByteString &rRootDirectory, const ByteString &rVersion , bool bLocal_in )
/*****************************************************************************/
- : bInExecute( FALSE ) , bLocal( bLocal_in )
+ : bInExecute( sal_False ) , bLocal( bLocal_in )
{
(void) rVersion ;
@@ -103,31 +103,31 @@ void SourceTreeIterator::ExecuteDirectory( transex::Directory& aDirectory )
aDirectory.readDirectory();
OnExecuteDirectory( aDirectory.getFullName() );
if ( aDirectory.getSubDirectories().size() )
- for ( ULONG i=0;i < aDirectory.getSubDirectories().size();i++ )
+ for ( sal_uIntPtr i=0;i < aDirectory.getSubDirectories().size();i++ )
ExecuteDirectory( aDirectory.getSubDirectories()[ i ] );
}
}
/*****************************************************************************/
-BOOL SourceTreeIterator::StartExecute()
+sal_Bool SourceTreeIterator::StartExecute()
/*****************************************************************************/
{
- bInExecute = TRUE; // FIXME
+ bInExecute = sal_True; // FIXME
ExecuteDirectory( aRootDirectory );
if ( bInExecute ) { // FIXME
- bInExecute = FALSE;
- return TRUE;
+ bInExecute = sal_False;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
void SourceTreeIterator::EndExecute()
/*****************************************************************************/
{
- bInExecute = FALSE;
+ bInExecute = sal_False;
}
/*****************************************************************************/
diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx
index c382aaa7272d..13d474e2d59c 100644
--- a/l10ntools/source/tagtest.cxx
+++ b/l10ntools/source/tagtest.cxx
@@ -42,12 +42,12 @@
-TokenInfo::TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList &rErrorList )
-: bClosed(FALSE)
-, bCloseTag(FALSE)
-, bIsBroken(FALSE)
-, bHasBeenFixed(FALSE)
-, bDone(FALSE)
+TokenInfo::TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr, ParserMessageList &rErrorList )
+: bClosed(sal_False)
+, bCloseTag(sal_False)
+, bIsBroken(sal_False)
+, bHasBeenFixed(sal_False)
+, bDone(sal_False)
, aTokenString( paStr )
, nId( pnId )
, nPos(nP)
@@ -90,14 +90,14 @@ CLOSETAG_HAS_TAG_NAME '>' -> FINISHED
*/
void TokenInfo::SplitTag( ParserMessageList &rErrorList )
{
- USHORT nLastPos = 2; // skip initial \<
- USHORT nCheckPos = nLastPos;
+ sal_uInt16 nLastPos = 2; // skip initial \<
+ sal_uInt16 nCheckPos = nLastPos;
String aDelims( String::CreateFromAscii( " \\=>/" ) );
String aPortion;
String aValue; // store the value of a property
ByteString aName; // store the name of a property/tag
- BOOL bCheckName = FALSE;
- BOOL bCheckEmpty = FALSE;
+ sal_Bool bCheckName = sal_False;
+ sal_Bool bCheckEmpty = sal_False;
sal_Unicode cDelim;
tagcheck aState = TC_START;
@@ -126,7 +126,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_TAG_NAME;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '/':
{
@@ -137,12 +137,12 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
else
{
aState = TC_CLOSED;
- bCheckName = TRUE;
+ bCheckName = sal_True;
}
}
break;
case '>': aState = TC_FINISHED;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -156,16 +156,16 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '=': aState = TC_HAS_PROP_NAME_EQ;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case ' ': aState = TC_HAS_PROP_NAME_SP;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '/': aState = TC_CLOSED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -176,7 +176,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '=': aState = TC_HAS_PROP_NAME_EQ;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -188,10 +188,10 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_PROP_NAME_EQ_SP;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '\"': aState = TC_INSIDE_STRING;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
aValue.Erase();
break;
default: aState = TC_ERROR;
@@ -203,7 +203,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '\"': aState = TC_INSIDE_STRING;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
aValue.Erase();
break;
default: aState = TC_ERROR;
@@ -224,14 +224,14 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( !IsPropertyValueValid( aName, aValue ) )
{
rErrorList.AddError( 25, ByteString("Property '").Append(aName).Append("' has invalid value '").Append(ByteString( aValue, RTL_TEXTENCODING_UTF8 )).Append("' "), *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
aProperties[ aName ] = aValue;
}
else
{
rErrorList.AddError( 25, ByteString("Property '").Append(aName).Append("' defined twice "), *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
}
break;
@@ -251,13 +251,13 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_TAG_NAME;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '/': aState = TC_CLOSED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -269,11 +269,11 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_CLOSED_SPACE;
- bCheckEmpty = TRUE;
- bClosed = TRUE;
+ bCheckEmpty = sal_True;
+ bClosed = sal_True;
break;
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -284,7 +284,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -293,16 +293,16 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
// CLOSETAG ' ' -> CLOSETAG_HAS_TAG_NAME
// CLOSETAG '>' -> FINISHED
case TC_CLOSETAG:
- bCloseTag = TRUE;
+ bCloseTag = sal_True;
switch ( cDelim )
{
case ' ': aState = TC_CLOSETAG_HAS_TAG_NAME;
aTagName = aPortion;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '>': aState = TC_FINISHED;
aTagName = aPortion;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -313,7 +313,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -321,7 +321,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
default: rErrorList.AddError( 99, "Internal error Parsing Tag ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
@@ -330,14 +330,14 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( aPortion.Len() == 0 )
{
rErrorList.AddError( 25, "Tag/Property name missing ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
else
{
aName = ByteString( aPortion, RTL_TEXTENCODING_UTF8 );
// "a-zA-Z_-.0-9"
xub_StrLen nCount;
- BOOL bBroken = FALSE;
+ sal_Bool bBroken = sal_False;
const sal_Char* aBuf = aName.GetBuffer();
for ( nCount = 0 ; !bBroken && nCount < aName.Len() ; nCount++ )
{
@@ -353,11 +353,11 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( bBroken )
{
rErrorList.AddError( 25, "Found illegal character in Tag/Property name ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
}
- bCheckName = FALSE;
+ bCheckName = sal_False;
}
if ( bCheckEmpty )
@@ -365,9 +365,9 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( aPortion.Len() )
{
rErrorList.AddError( 25, ByteString("Found displaced characters '").Append(ByteString( aPortion, RTL_TEXTENCODING_UTF8 )).Append("' in Tag "), *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
- bCheckEmpty = FALSE;
+ bCheckEmpty = sal_False;
}
@@ -383,23 +383,23 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( aState != TC_FINISHED )
{
rErrorList.AddError( 25, "Parsing error in Tag ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
}
-BOOL TokenInfo::IsPropertyRelevant( const ByteString &aName, const String &aValue ) const
+sal_Bool TokenInfo::IsPropertyRelevant( const ByteString &aName, const String &aValue ) const
{
if ( aTagName.EqualsAscii( "alt" ) && aName.Equals( "xml-lang" ) )
- return FALSE;
+ return sal_False;
if ( aTagName.EqualsAscii( "ahelp" ) && aName.Equals( "visibility" ) && aValue.EqualsAscii("visible") )
- return FALSE;
+ return sal_False;
if ( aTagName.EqualsAscii( "image" ) && (aName.Equals( "width" ) || aName.Equals( "height" )) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
-BOOL TokenInfo::IsPropertyValueValid( const ByteString &aName, const String &aValue ) const
+sal_Bool TokenInfo::IsPropertyValueValid( const ByteString &aName, const String &aValue ) const
{
/* removed due to i56740
if ( aTagName.EqualsAscii( "switchinline" ) && aName.Equals( "select" ) )
@@ -415,26 +415,26 @@ BOOL TokenInfo::IsPropertyValueValid( const ByteString &aName, const String &aVa
}
// we don't know any better so we assume it to be OK
- return TRUE;
+ return sal_True;
}
-BOOL TokenInfo::IsPropertyInvariant( const ByteString &aName, const String &aValue ) const
+sal_Bool TokenInfo::IsPropertyInvariant( const ByteString &aName, const String &aValue ) const
{
if ( aTagName.EqualsAscii( "link" ) && aName.Equals( "name" ) )
- return FALSE;
+ return sal_False;
if ( aTagName.EqualsAscii( "link" ) && aName.Equals( "href" ) )
{ // check for external reference
if ( aValue.Copy( 0, 5 ).EqualsIgnoreCaseAscii( "http:" )
|| aValue.Copy( 0, 6 ).EqualsIgnoreCaseAscii( "https:" )
|| aValue.Copy( 0, 4 ).EqualsIgnoreCaseAscii( "ftp:" ) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
-BOOL TokenInfo::IsPropertyFixable( const ByteString &aName ) const
+sal_Bool TokenInfo::IsPropertyFixable( const ByteString &aName ) const
{
// name everything that is allowed to be fixed automatically here
if ( (aTagName.EqualsAscii( "ahelp" ) && aName.Equals( "hid" ))
@@ -443,25 +443,25 @@ BOOL TokenInfo::IsPropertyFixable( const ByteString &aName ) const
|| (aTagName.EqualsAscii( "variable" ) && aName.Equals( "id" ))
|| (aTagName.EqualsAscii( "image" ) && aName.Equals( "src" ))
|| (aTagName.EqualsAscii( "image" ) && aName.Equals( "id" ) ))
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMessageList &rErrorList, BOOL bFixTags ) const
+sal_Bool TokenInfo::MatchesTranslation( TokenInfo& rInfo, sal_Bool bGenErrors, ParserMessageList &rErrorList, sal_Bool bFixTags ) const
{
// check if tags are equal
// check if all existing properties are in the translation as well and
// wether they have a matching content (the same in most cases)
if ( nId != rInfo.nId )
- return FALSE;
+ return sal_False;
if ( !aTagName.Equals( rInfo.aTagName ) )
- return FALSE;
+ return sal_False;
// If one of the tags has formating errors already it does make no sense to check here, so return right away
if ( bGenErrors && ( bIsBroken || rInfo.bIsBroken ) )
- return TRUE;
+ return sal_True;
StringHashMap::const_iterator iProp;
for( iProp = aProperties.begin() ; iProp != aProperties.end(); ++iProp )
@@ -485,7 +485,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
else
rErrorList.AddError( 25, ByteString("Property '").Append(iProp->first).Append("': value different in Translation "), *this );
}
- else return FALSE;
+ else return sal_False;
}
}
}
@@ -496,7 +496,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
{
if ( bGenErrors )
rErrorList.AddError( 25, ByteString("Property '").Append(iProp->first).Append("' missing in Translation "), *this );
- else return FALSE;
+ else return sal_False;
}
}
}
@@ -508,7 +508,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
{
if ( bGenErrors )
rErrorList.AddError( 25, ByteString("Extra Property '").Append(iProp->first).Append("' in Translation "), rInfo );
- else return FALSE;
+ else return sal_False;
}
}
}
@@ -516,7 +516,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
// if we reach here eather
// the tags match completely or
// the tags match but not the properties and we generated errors for that
- return TRUE;
+ return sal_True;
}
String TokenInfo::GetTagName() const
@@ -548,23 +548,23 @@ String TokenInfo::MakeTag() const
}
-void ParserMessageList::AddError( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
+void ParserMessageList::AddError( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
{
Insert( new ParserError( nErrorNr, aErrorText, rTag ), LIST_APPEND );
}
-void ParserMessageList::AddWarning( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
+void ParserMessageList::AddWarning( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
{
Insert( new ParserWarning( nErrorNr, aErrorText, rTag ), LIST_APPEND );
}
-BOOL ParserMessageList::HasErrors()
+sal_Bool ParserMessageList::HasErrors()
{
- USHORT i;
+ sal_uInt16 i;
for ( i=0 ; i < Count() ; i++ )
if ( GetObject( i )->IsError() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
struct Tag
@@ -669,7 +669,7 @@ void SimpleParser::Parse( String PaSource )
TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
{
TokenInfo aResult;
- USHORT nTokenStartPos = 0;
+ sal_uInt16 nTokenStartPos = 0;
if ( aNextTag.nId != TAG_NOMORETAGS )
{
aResult = aNextTag;
@@ -686,9 +686,9 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
{
// check for paired \" \"
bool bEven = true;
- USHORT nQuotePos = 0;
- USHORT nQuotedQuotesPos = aLastToken.SearchAscii( "\\\"" );
- USHORT nQuotedBackPos = aLastToken.SearchAscii( "\\\\" ); // this is only to kick out quoted backslashes
+ sal_uInt16 nQuotePos = 0;
+ sal_uInt16 nQuotedQuotesPos = aLastToken.SearchAscii( "\\\"" );
+ sal_uInt16 nQuotedBackPos = aLastToken.SearchAscii( "\\\\" ); // this is only to kick out quoted backslashes
while ( nQuotedQuotesPos != STRING_NOTFOUND )
{
if ( nQuotedBackPos <= nQuotedQuotesPos )
@@ -707,7 +707,7 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
}
// check if we have an end-tag or a start-tag
- USHORT nNonBlankStartPos,nNonBlankEndPos;
+ sal_uInt16 nNonBlankStartPos,nNonBlankEndPos;
nNonBlankStartPos = 2;
while ( aLastToken.GetChar(nNonBlankStartPos) == ' ' )
nNonBlankStartPos++;
@@ -725,7 +725,7 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
}
else
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( aKnownTags[i].nTag != TAG_UNKNOWN_TAG &&
aLastToken != aKnownTags[i].GetName() )
i++;
@@ -739,12 +739,12 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
return aResult;
}
-String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &rTagStartPos )
+String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, sal_uInt16 &rTagStartPos )
{
-// USHORT nStyle1StartPos = aSource.SearchAscii( "<#", nPos );
- USHORT nStyle2StartPos = aSource.SearchAscii( "$[", nPos );
- USHORT nStyle3StartPos = aSource.SearchAscii( "\\<", nPos );
- USHORT nStyle4StartPos = aSource.SearchAscii( "\\\\", nPos ); // this is only to kick out quoted backslashes
+// sal_uInt16 nStyle1StartPos = aSource.SearchAscii( "<#", nPos );
+ sal_uInt16 nStyle2StartPos = aSource.SearchAscii( "$[", nPos );
+ sal_uInt16 nStyle3StartPos = aSource.SearchAscii( "\\<", nPos );
+ sal_uInt16 nStyle4StartPos = aSource.SearchAscii( "\\\\", nPos ); // this is only to kick out quoted backslashes
rTagStartPos = 0;
@@ -764,7 +764,7 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
/* if ( nStyle1StartPos < nStyle2StartPos && nStyle1StartPos <= nStyle3StartPos ) // <= to make sure our spechial tags are recognized before all others
{ // test for <# ... > style tokens
- USHORT nEndPos = aSource.SearchAscii( ">", nStyle1StartPos );
+ sal_uInt16 nEndPos = aSource.SearchAscii( ">", nStyle1StartPos );
if ( nEndPos == STRING_NOTFOUND )
{ // Token is incomplete. Skip start and search for better ones
nPos = nStyle1StartPos +2;
@@ -776,7 +776,7 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
}
else*/ if ( nStyle2StartPos < nStyle3StartPos )
{ // test for $[ ... ] style tokens
- USHORT nEndPos = aSource.SearchAscii( "]", nStyle2StartPos);
+ sal_uInt16 nEndPos = aSource.SearchAscii( "]", nStyle2StartPos);
if ( nEndPos == STRING_NOTFOUND )
{ // Token is incomplete. Skip start and search for better ones
nPos = nStyle2StartPos +2;
@@ -788,8 +788,8 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
}
else
{ // test for \< ... \> style tokens
- USHORT nEndPos = aSource.SearchAscii( "\\>", nStyle3StartPos);
- USHORT nQuotedBackPos = aSource.SearchAscii( "\\\\", nStyle3StartPos ); // this is only to kick out quoted backslashes
+ sal_uInt16 nEndPos = aSource.SearchAscii( "\\>", nStyle3StartPos);
+ sal_uInt16 nQuotedBackPos = aSource.SearchAscii( "\\\\", nStyle3StartPos ); // this is only to kick out quoted backslashes
while ( nQuotedBackPos <= nEndPos && nQuotedBackPos != STRING_NOTFOUND )
{
nEndPos = aSource.SearchAscii( "\\>", nQuotedBackPos +2);
@@ -816,7 +816,7 @@ String SimpleParser::GetLexem( TokenInfo const &aToken )
return aToken.aTokenString;
else
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( aKnownTags[i].nTag != TAG_UNKNOWN_TAG &&
aKnownTags[i].nTag != aToken.nId )
i++;
@@ -841,8 +841,8 @@ void TokenParser::Parse( const String &aCode, ParserMessageList* pList )
nPfCaseOptions = 0;
nAppCaseOptions = 0;
- bPfCaseActive = FALSE;
- bAppCaseActive = FALSE;
+ bPfCaseActive = sal_False;
+ bAppCaseActive = sal_False;
nActiveRefTypes = 0;
@@ -977,11 +977,11 @@ void TokenParser::Paragraph()
if ( ! bPfCaseActive )
{
//PfCases duerfen nicht verschachtelt sein:
- bPfCaseActive = TRUE;
+ bPfCaseActive = sal_True;
PfCase();
//So jetzt kann wieder ein PfCase kommen:
- bPfCaseActive = FALSE;
+ bPfCaseActive = sal_False;
Paragraph();
}
}
@@ -999,11 +999,11 @@ void TokenParser::Paragraph()
if ( !bAppCaseActive )
{
//AppCases duerfen nicht verschachtelt sein:
- bAppCaseActive = TRUE;
+ bAppCaseActive = sal_True;
AppCase();
//jetzt koennen wieder AppCases kommen:
- bAppCaseActive = FALSE;
+ bAppCaseActive = sal_False;
Paragraph();
}
}
@@ -1311,12 +1311,12 @@ void TokenParser::TagRef()
}
}
-BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken )
+sal_Bool TokenParser::match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken )
{
return match( aCurrentToken, TokenInfo( aExpectedToken, TOK_INVALIDPOS ) );
}
-BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpectedToken )
+sal_Bool TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpectedToken )
{
TokenInfo aExpectedToken( rExpectedToken );
if ( aCurrentToken.nId == aExpectedToken.nId )
@@ -1326,7 +1326,7 @@ BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpec
|| aCurrentToken.nId != TAG_COMMONEND )
{
aTag = aParser.GetNextToken( *pErrorList );
- return TRUE;
+ return sal_True;
}
}
@@ -1347,10 +1347,10 @@ BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpec
sTmp += " near ";
ParseError( 7, sTmp, aCurrentToken );
}
- return FALSE;
+ return sal_False;
}
-void TokenParser::ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo &rTag )
+void TokenParser::ParseError( sal_uInt16 nErrNr, ByteString aErrMsg, const TokenInfo &rTag )
{
pErrorList->AddError( nErrNr, aErrMsg, rTag);
@@ -1359,7 +1359,7 @@ void TokenParser::ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo
}
-ParserMessage::ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag )
+ParserMessage::ParserMessage( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag )
: nErrorNr( PnErrorNr )
, aErrorText( PaErrorText )
, nTagBegin( 0 )
@@ -1379,15 +1379,15 @@ ParserMessage::ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const To
nTagLength = aLexem.Len();
}
-ParserError::ParserError( USHORT ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
+ParserError::ParserError( sal_uInt16 ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
: ParserMessage( ErrorNr, ErrorText, rTag )
{}
-ParserWarning::ParserWarning( USHORT ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
+ParserWarning::ParserWarning( sal_uInt16 ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
: ParserMessage( ErrorNr, ErrorText, rTag )
{}
-BOOL LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
+sal_Bool LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
{
TokenId aTokenId = aToken.nId;
TokenId aTokenGroup = TAG_GROUP( aTokenId );
@@ -1404,7 +1404,7 @@ BOOL LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
{
if ( TAG_GROUP_META == aTokenGroup )
aMetaTokens |= aTokenId;
- return TRUE;
+ return sal_True;
}
else if ( TAG_COMMONSTART == aTokenId
|| TAG_COMMONEND == aTokenId )
@@ -1416,12 +1416,12 @@ BOOL LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
|| aTagName.EqualsIgnoreCaseAscii( "item" )
|| aTagName.EqualsIgnoreCaseAscii( "br" ) );
}
- return FALSE;
+ return sal_False;
}
-void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTags )
+void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, sal_Bool bFixTags )
{
- ULONG i=0,j=0;
+ sal_uIntPtr i=0,j=0;
// Clean old Warnings
while ( aCompareWarningList.Count() )
{
@@ -1458,39 +1458,39 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
if ( aReference.GetObject( i ).IsDone() )
continue;
- BOOL bTagFound = FALSE;
+ sal_Bool bTagFound = sal_False;
for ( j=0 ; j < aTestee.Count() && !bTagFound ; j++ )
{
if ( aTestee.GetObject( j ).IsDone() )
continue;
- if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), FALSE, aCompareWarningList ) )
+ if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), sal_False, aCompareWarningList ) )
{
aReference.GetObject( i ).SetDone();
aTestee.GetObject( j ).SetDone();
- bTagFound = TRUE;
+ bTagFound = sal_True;
}
}
}
- BOOL bCanFix = TRUE;
+ sal_Bool bCanFix = sal_True;
if ( bFixTags )
{
// we fix only if its a really simple case
- USHORT nTagCount = 0;
+ sal_uInt16 nTagCount = 0;
for ( i=0 ; i < aReference.Count() ; i++ )
if ( !aReference.GetObject( i ).IsDone() )
nTagCount++;
if ( nTagCount > 1 )
- bCanFix = FALSE;
+ bCanFix = sal_False;
nTagCount = 0;
for ( i=0 ; i < aTestee.Count() ; i++ )
if ( !aTestee.GetObject( i ).IsDone() )
nTagCount++;
if ( nTagCount > 1 )
- bCanFix = FALSE;
+ bCanFix = sal_False;
}
// generate errors for tags that have differing attributes
@@ -1499,17 +1499,17 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
if ( aReference.GetObject( i ).IsDone() )
continue;
- BOOL bTagFound = FALSE;
+ sal_Bool bTagFound = sal_False;
for ( j=0 ; j < aTestee.Count() && !bTagFound ; j++ )
{
if ( aTestee.GetObject( j ).IsDone() )
continue;
- if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), TRUE, aCompareWarningList, bCanFix && bFixTags ) )
+ if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), sal_True, aCompareWarningList, bCanFix && bFixTags ) )
{
aReference.GetObject( i ).SetDone();
aTestee.GetObject( j ).SetDone();
- bTagFound = TRUE;
+ bTagFound = sal_True;
}
}
}
@@ -1531,10 +1531,10 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
}
for ( i=0 ; i < aReference.Count() ; i++ )
- aReference.GetObject( i ).SetDone( FALSE );
+ aReference.GetObject( i ).SetDone( sal_False );
for ( i=0 ; i < aTestee.Count() ; i++ )
- aTestee.GetObject( i ).SetDone( FALSE );
+ aTestee.GetObject( i ).SetDone( sal_False );
}
void LingTest::CheckReference( GSILine *aReference )
@@ -1542,7 +1542,7 @@ void LingTest::CheckReference( GSILine *aReference )
aReferenceParser.Parse( aReference->GetUText(), aReference->GetMessageList() );
}
-void LingTest::CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags )
+void LingTest::CheckTestee( GSILine *aTestee, sal_Bool bHasSourceLine, sal_Bool bFixTags )
{
aFixedTestee = aTestee->GetUText();
aTesteeParser.Parse( aFixedTestee, aTestee->GetMessageList() );
@@ -1553,14 +1553,14 @@ void LingTest::CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags
if ( bFixTags )
{
TokenList& aTesteeTokens = aTesteeParser.GetTokenList();
- BOOL bFixesDone = FALSE;
+ sal_Bool bFixesDone = sal_False;
// count backwards to allow replacing from right to left
int i;
for ( i=aTesteeTokens.Count()-1 ; i>=0 ; i-- )
{
if ( aTesteeTokens.GetObject( i ).HasBeenFixed() )
{
- bFixesDone = TRUE;
+ bFixesDone = sal_True;
aFixedTestee.Replace( aTesteeTokens.GetObject( i ).nPos, aTesteeTokens.GetObject( i ).aTokenString.Len(), aTesteeTokens.GetObject( i ).MakeTag() );
}
}
diff --git a/l10ntools/source/wtranode.cxx b/l10ntools/source/wtranode.cxx
index 47fadc5d17f7..1f51fea49d02 100644
--- a/l10ntools/source/wtranode.cxx
+++ b/l10ntools/source/wtranode.cxx
@@ -79,11 +79,11 @@ WTT_Node::~WTT_Node()
{
// Delete the tree hanging below this node:
- bIsOnDeleting = TRUE; // Avoid double deleting of multiple used nodes.
+ bIsOnDeleting = sal_True; // Avoid double deleting of multiple used nodes.
for (int i = 0; i < C_NR_OF_BRANCHES; i++)
{
- if (aBranches[i] != 0 ? ! aBranches[i]->IsOnDeleting() : FALSE)
+ if (aBranches[i] != 0 ? ! aBranches[i]->IsOnDeleting() : sal_False)
{
delete aBranches[i];
}
diff --git a/l10ntools/source/wtratree.cxx b/l10ntools/source/wtratree.cxx
index 28adf7c7142b..efd60ad48442 100644
--- a/l10ntools/source/wtratree.cxx
+++ b/l10ntools/source/wtratree.cxx
@@ -255,10 +255,10 @@ WordTransTree::TransformNextToken()
// 9. TB~Eot continue
// bNext and Prev are true, if there are alphabetic letters:
- BOOL bNext = pInputPosition + 1 != pInputEnd
+ sal_Bool bNext = pInputPosition + 1 != pInputEnd
? CalculateBranch(pInputPosition[1]) >= BR_ALPHABASE
- : FALSE;
- BOOL bPrev = pCurParseNode->Value() >= BR_ALPHABASE;
+ : sal_False;
+ sal_Bool bPrev = pCurParseNode->Value() >= BR_ALPHABASE;
if ( bNext && (bPrev || pCurParseNode == dpParsingTreeTop) )
{ // case 1. and 7.
@@ -330,11 +330,11 @@ WordTransTree::Handle_TokenToKeep()
void
WordTransTree::Handle_TokenToTransform()
{
- BOOL bHaveHotkey = CalculateBranch(cCurHotkey) >= BR_ALPHABASE;
+ sal_Bool bHaveHotkey = CalculateBranch(cCurHotkey) >= BR_ALPHABASE;
const ByteString & rReplace = pCurParseNode->ReplaceString();
// Find position of hotkey in replace-string:
- USHORT nHotkeyPos = bHaveHotkey
+ sal_uInt16 nHotkeyPos = bHaveHotkey
? rReplace.Search(char(cCurHotkey))
: STRING_NOTFOUND;
if (nHotkeyPos == STRING_NOTFOUND && bHaveHotkey)
@@ -365,7 +365,7 @@ WordTransTree::Handle_TokenToTransform()
if (nHotkeyPos == STRING_NOTFOUND)
{
eCurResult = HOTKEY_LOST;
- bHaveHotkey = FALSE;
+ bHaveHotkey = sal_False;
}
} // endif (nHotkeyPos == STRING_NOT_FOUND && bHaveHotkey)
diff --git a/l10ntools/source/xgfconv.cxx b/l10ntools/source/xgfconv.cxx
index 54b92fb3c1c2..0f406ca20b25 100644
--- a/l10ntools/source/xgfconv.cxx
+++ b/l10ntools/source/xgfconv.cxx
@@ -36,14 +36,14 @@ int _cdecl main( int argc, char *argv[] )
}
ByteString sLine;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
while ( !aInput.IsEof()) {
aInput.ReadLine( sLine );
ByteString sLangId = sLine.GetToken( 0, '\t' );
ByteString sFile = sLine.GetToken( 1, '\t' );
ByteString sText = sLine.Copy( sLangId.Len() + sFile.Len() + 2 );
- USHORT nLangId = sLangId.ToInt32();
+ sal_uInt16 nLangId = sLangId.ToInt32();
CharSet aCharSet = Export::GetCharSet( nLangId );
if ( aCharSet != 0xFFFF && sText.Len()) {
sText = UTF8Converter::ConvertToUTF8( sText, aCharSet );
@@ -55,7 +55,7 @@ int _cdecl main( int argc, char *argv[] )
aOutput.WriteLine( sEmpty );
}
else
- bFirst = FALSE;
+ bFirst = sal_False;
aOutput.Write( sOutput.GetBuffer(), sOutput.Len());
}
}
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 14b5944488a9..a92eed15c9fa 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -96,7 +96,7 @@ XMLParentNode::XMLParentNode( const XMLParentNode& obj)
if( obj.pChildList ){
pChildList=new XMLChildNodeList();
XMLChildNode* pNode = NULL;
- for ( ULONG i = 0; i < obj.pChildList->Count(); i++ ){
+ for ( sal_uIntPtr i = 0; i < obj.pChildList->Count(); i++ ){
pNode = obj.pChildList->GetObject( i );
if( pNode != NULL){
switch(pNode->GetNodeType()){
@@ -126,7 +126,7 @@ XMLParentNode& XMLParentNode::operator=(const XMLParentNode& obj){
}
if( obj.pChildList ){
pChildList=new XMLChildNodeList();
- for ( ULONG i = 0; i < obj.pChildList->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < obj.pChildList->Count(); i++ )
AddChild( obj.pChildList->GetObject( i ) );
}else pChildList = NULL;
@@ -160,7 +160,7 @@ int XMLParentNode::GetPosition( ByteString id ){
static const ByteString sDeStr = ByteString(String::CreateFromAscii(GERMAN_ISO2).ToLowerAscii() , RTL_TEXTENCODING_ASCII_US ).ToLowerAscii();
if ( pChildList ){
- for ( ULONG i = 0; i < pChildList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pChildList->Count(); i++ ) {
XMLChildNode *pChild = pChildList->GetObject( i );
if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
a = static_cast<XMLElement* >(pChild);
@@ -188,7 +188,7 @@ int XMLParentNode::RemoveChild( XMLElement *pRefElement )
{
XMLElement* a;
if ( pChildList ){
- for ( ULONG i = 0; i < pChildList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pChildList->Count(); i++ ) {
XMLChildNode *pChild = pChildList->GetObject( i );
if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
a = static_cast<XMLElement* >(pChild);
@@ -218,7 +218,7 @@ int XMLParentNode::RemoveChild( XMLElement *pRefElement )
void XMLParentNode::RemoveAndDeleteAllChilds(){
/*****************************************************************************/
if ( pChildList ) {
- for ( ULONG i = 0; i < pChildList->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pChildList->Count(); i++ )
delete pChildList->GetObject( i );
pChildList->Clear();
}
@@ -228,7 +228,7 @@ void XMLParentNode::RemoveAndDeleteAllChilds(){
XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pChildList->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pChildList->Count(); i++ ) {
XMLChildNode *pChild = pChildList->GetObject( i );
if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT )
if ((( XMLElement * ) pChild )->GetName() ==
@@ -238,14 +238,14 @@ XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
if ( !pList )
return ( XMLElement * ) pChild;
- BOOL bMatch = FALSE;
- for ( ULONG j = 0; j < pList->Count() && bMatch; j++ ) {
+ sal_Bool bMatch = sal_False;
+ for ( sal_uIntPtr j = 0; j < pList->Count() && bMatch; j++ ) {
XMLAttribute *pAttribute = pList->GetObject( j );
XMLAttribute *pCandidate =
(( XMLElement * ) pChild )->GetAttribute(
*pAttribute );
if ( !pCandidate || !pAttribute->IsEqual( *pCandidate ))
- bMatch = FALSE;
+ bMatch = sal_False;
}
if ( bMatch )
return ( XMLElement * ) pChild;
@@ -259,14 +259,14 @@ XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
//
/*****************************************************************************/
-USHORT XMLFile::GetNodeType()
+sal_uInt16 XMLFile::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_FILE;
}
/*****************************************************************************/
-BOOL XMLFile::Write( ByteString &aFilename )
+sal_Bool XMLFile::Write( ByteString &aFilename )
/*****************************************************************************/
{
@@ -323,7 +323,7 @@ void XMLFile::WriteString( ofstream &rStream, const String &sString )
}
-BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
+sal_Bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
{
XMLUtil& xmlutil = XMLUtil::Instance();
(void) xmlutil;
@@ -334,7 +334,7 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
switch( pCur->GetNodeType()) {
case XML_NODE_TYPE_FILE: {
if( GetChildList())
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < GetChildList()->Count(); i++ )
Write( rStream, GetChildList()->GetObject( i ));
}
break;
@@ -343,7 +343,7 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
rStream << "<";
WriteString( rStream, pElement->GetName());
if ( pElement->GetAttributeList())
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ) {
+ for ( sal_uIntPtr j = 0; j < pElement->GetAttributeList()->Count(); j++ ) {
rStream << " ";
String sData(*pElement->GetAttributeList()->GetObject( j ));
xmlutil.QuotHTML( sData );
@@ -358,7 +358,7 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
rStream << "/>";
else {
rStream << ">";
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uIntPtr k = 0; k < pElement->GetChildList()->Count(); k++ )
Write( rStream, pElement->GetChildList()->GetObject( k ));
rStream << "</";
WriteString( rStream, pElement->GetName());
@@ -387,11 +387,11 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
break;
}
}
- return TRUE;
+ return sal_True;
}
-void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
+void XMLFile::Print( XMLNode *pCur, sal_uInt16 nLevel )
{
if ( !pCur )
@@ -400,7 +400,7 @@ void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
switch( pCur->GetNodeType()) {
case XML_NODE_TYPE_FILE: {
if( GetChildList())
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < GetChildList()->Count(); i++ )
Print( GetChildList()->GetObject( i ));
}
break;
@@ -409,7 +409,7 @@ void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
fprintf( stdout, "<%s", ByteString( pElement->GetName(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
if ( pElement->GetAttributeList())
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
+ for ( sal_uIntPtr j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
ByteString aAttrName( *pElement->GetAttributeList()->GetObject( j ), RTL_TEXTENCODING_UTF8 );
if( !aAttrName.EqualsIgnoreCaseAscii( XML_LANG ) ) {
fprintf( stdout, " %s=\"%s\"",
@@ -422,7 +422,7 @@ void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
fprintf( stdout, "/>" );
else {
fprintf( stdout, ">" );
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uIntPtr k = 0; k < pElement->GetChildList()->Count(); k++ )
Print( pElement->GetChildList()->GetObject( k ), nLevel + 1 );
fprintf( stdout, "</%s>", ByteString( pElement->GetName(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
}
@@ -469,14 +469,14 @@ XMLFile::XMLFile( const String &rFileName ) // the file name, empty if created f
XMLStrings ( NULL )
{
-// nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark_value"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("variable"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("paragraph"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("alt"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("caption"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("title"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("link"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
+// nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark_value"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("variable"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("paragraph"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("alt"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("caption"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("title"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("link"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
}
/*****************************************************************************/
void XMLFile::Extract( XMLFile *pCur )
@@ -517,7 +517,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement ){
LangHashMap* elem;
if( pElement->GetAttributeList() != NULL ){
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
+ for ( sal_uIntPtr j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
tmpStr=ByteString( *pElement->GetAttributeList()->GetObject( j ),RTL_TEXTENCODING_UTF8 );
if( tmpStr.CompareTo(ID)==COMPARE_EQUAL ){ // Get the "id" Attribute
id = ByteString( pElement->GetAttributeList()->GetObject( j )->GetValue(),RTL_TEXTENCODING_UTF8 );
@@ -633,7 +633,7 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos)
case XML_NODE_TYPE_FILE: {
XMLParentNode* pElement;
if( GetChildList()){
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ ){
+ for ( sal_uIntPtr i = 0; i < GetChildList()->Count(); i++ ){
pElement = (XMLParentNode*) GetChildList()->GetObject( i );
if( pElement->GetNodeType() == XML_NODE_TYPE_ELEMENT ) SearchL10NElements( pElement , i);
}
@@ -645,7 +645,7 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos)
ByteString sName(pElement->GetName(),RTL_TEXTENCODING_ASCII_US);
ByteString language,tmpStrVal,oldref;
if ( pElement->GetAttributeList()){
- for ( ULONG j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
+ for ( sal_uIntPtr j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
const ByteString tmpStr( *pElement->GetAttributeList()->GetObject( j ),RTL_TEXTENCODING_UTF8 );
if( tmpStr.CompareTo(THEID)==COMPARE_EQUAL ){ // Get the "id" Attribute
tmpStrVal=ByteString( pElement->GetAttributeList()->GetObject( j )->GetValue(),RTL_TEXTENCODING_UTF8 );
@@ -670,7 +670,7 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos)
if ( bInsert && ( nodes_localize.find( sName.ToLowerAscii() ) != nodes_localize.end() ) )
InsertL10NElement(pElement);
else if ( bInsert && pElement->GetChildList() ){
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uIntPtr k = 0; k < pElement->GetChildList()->Count(); k++ )
SearchL10NElements( (XMLParentNode*) pElement->GetChildList()->GetObject( k ) , k);
}
}
@@ -707,7 +707,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
case XML_NODE_TYPE_FILE: {
XMLParentNode* pElement;
if( GetChildList()){
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ ){
+ for ( sal_uIntPtr i = 0; i < GetChildList()->Count(); i++ ){
pElement = (XMLParentNode*) GetChildList()->GetObject( i );
if( pElement->GetNodeType() == XML_NODE_TYPE_ELEMENT ) CheckExportStatus( pElement );//, i);
}
@@ -719,7 +719,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
ByteString sName(pElement->GetName(),RTL_TEXTENCODING_ASCII_US);
if( sName.EqualsIgnoreCaseAscii( TOPIC ) ){
if ( pElement->GetAttributeList()){
- for ( ULONG j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
+ for ( sal_uIntPtr j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
const ByteString tmpStr( *pElement->GetAttributeList()->GetObject( j ),RTL_TEXTENCODING_UTF8 );
if( tmpStr.EqualsIgnoreCaseAscii( STATUS ) ){
ByteString tmpStrVal=ByteString( pElement->GetAttributeList()->GetObject( j )->GetValue(),RTL_TEXTENCODING_UTF8 );
@@ -733,7 +733,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
}
}
else if ( pElement->GetChildList() ){
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uIntPtr k = 0; k < pElement->GetChildList()->Count(); k++ )
CheckExportStatus( (XMLParentNode*) pElement->GetChildList()->GetObject( k ) );//, k);
}
}
@@ -744,7 +744,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
}
/*****************************************************************************/
-USHORT XMLElement::GetNodeType()
+sal_uInt16 XMLElement::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_ELEMENT;
@@ -768,7 +768,7 @@ XMLElement::XMLElement(const XMLElement& obj)
{
if ( obj.pAttributes ){
pAttributes = new XMLAttributeList();
- for ( ULONG i = 0; i < obj.pAttributes->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < obj.pAttributes->Count(); i++ )
AddAttribute( *obj.pAttributes->GetObject( i ) , obj.pAttributes->GetObject( i )->GetValue() );
}
}
@@ -788,13 +788,13 @@ XMLElement& XMLElement::operator=(const XMLElement& obj){
nPos =obj.nPos;
if ( pAttributes ){
- for ( ULONG i = 0; i < pAttributes->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pAttributes->Count(); i++ )
delete pAttributes->GetObject( i );
delete pAttributes;
}
if ( obj.pAttributes ){
pAttributes =new XMLAttributeList();
- for ( ULONG i = 0; i < obj.pAttributes->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < obj.pAttributes->Count(); i++ )
AddAttribute( *obj.pAttributes->GetObject( i ) , obj.pAttributes->GetObject( i )->GetValue() );
}
}
@@ -816,7 +816,7 @@ void XMLElement::ChangeLanguageTag( const String &rValue ){
static const String rName = String::CreateFromAscii("xml-lang");
SetLanguageId( ByteString(rValue,RTL_TEXTENCODING_UTF8) );
if ( pAttributes ){
- for ( ULONG i = 0; i < pAttributes->Count(); i++ ){
+ for ( sal_uIntPtr i = 0; i < pAttributes->Count(); i++ ){
if ( *pAttributes->GetObject( i ) == rName ){
pAttributes->GetObject( i )->setValue(rValue);
}
@@ -827,7 +827,7 @@ void XMLElement::ChangeLanguageTag( const String &rValue ){
XMLChildNodeList* pCList = GetChildList();
if( pCList != NULL ){
- for ( ULONG i = 0; i < pCList->Count(); i++ ){
+ for ( sal_uIntPtr i = 0; i < pCList->Count(); i++ ){
pNode = pCList->GetObject( i );
if( pNode != NULL && pNode->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
pElem = static_cast< XMLElement* >(pNode);
@@ -845,7 +845,7 @@ XMLAttribute *XMLElement::GetAttribute( const String &rName )
/*****************************************************************************/
{
if ( pAttributes )
- for ( ULONG i = 0; i < pAttributes->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pAttributes->Count(); i++ )
if ( *pAttributes->GetObject( i ) == rName )
return pAttributes->GetObject( i );
@@ -857,7 +857,7 @@ XMLElement::~XMLElement()
/*****************************************************************************/
{
if ( pAttributes ) {
- for ( ULONG i = 0; i < pAttributes->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pAttributes->Count(); i++ )
delete pAttributes->GetObject( i );
delete pAttributes;
@@ -906,7 +906,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement
if ( pElement->GetAttributeList()){
if ( pElement->GetChildList()){
XMLChildNode* tmp=NULL;
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ ){
+ for ( sal_uIntPtr k = 0; k < pElement->GetChildList()->Count(); k++ ){
tmp=pElement->GetChildList()->GetObject( k );
Print( tmp, buffer , false);
}
@@ -923,7 +923,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement
buffer.append( OUString::createFromAscii("\\<") );
buffer.append( pElement->GetName() );
if ( pElement->GetAttributeList()){
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
+ for ( sal_uIntPtr j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
OUString aAttrName( *pElement->GetAttributeList()->GetObject( j ) );
if( !aAttrName.equalsIgnoreAsciiCase( XML_LANG ) ) {
@@ -941,7 +941,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement
else {
buffer.append( OUString::createFromAscii("\\>") );
XMLChildNode* tmp=NULL;
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ ){
+ for ( sal_uIntPtr k = 0; k < pElement->GetChildList()->Count(); k++ ){
tmp=pElement->GetChildList()->GetObject( k );
Print( tmp, buffer , false);
}
@@ -1006,7 +1006,7 @@ void XMLData::AddData( const String &rData) {
}
/*****************************************************************************/
-USHORT XMLData::GetNodeType()
+sal_uInt16 XMLData::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_DATA;
@@ -1017,7 +1017,7 @@ USHORT XMLData::GetNodeType()
//
/*****************************************************************************/
-USHORT XMLComment::GetNodeType()
+sal_uInt16 XMLComment::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_COMMENT;
@@ -1043,7 +1043,7 @@ XMLComment& XMLComment::operator=(const XMLComment& obj){
//
/*****************************************************************************/
-USHORT XMLDefault::GetNodeType()
+sal_uInt16 XMLDefault::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_DEFAULT;
@@ -1241,7 +1241,7 @@ XMLFile *SimpleXMLParser::Execute( SvMemoryStream *pStream )
pCurNode = pXMLFile;
pCurData = NULL;
- ULONG nPos = pStream->Tell();
+ sal_uIntPtr nPos = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_END );
aErrorInformation.eCode = XML_ERROR_NONE;
@@ -1256,7 +1256,7 @@ XMLFile *SimpleXMLParser::Execute( SvMemoryStream *pStream )
aErrorInformation.sMessage = String::CreateFromAscii( "XML-File parsed successfully" );
if ( !XML_Parse(
- aParser, ( char * ) pStream->GetData() + nPos, pStream->Tell() - nPos, TRUE ))
+ aParser, ( char * ) pStream->GetData() + nPos, pStream->Tell() - nPos, sal_True ))
{
aErrorInformation.eCode = XML_GetErrorCode( aParser );
aErrorInformation.nLine = XML_GetErrorLineNumber( aParser );
@@ -1326,7 +1326,7 @@ void XMLUtil::QuotHTML( String &rString )
static const String QAMP(String::CreateFromAscii("&amp;"));
static const String SLASH(String::CreateFromAscii("\\"));
- for ( USHORT i = 0; i < rString.Len(); i++) {
+ for ( sal_uInt16 i = 0; i < rString.Len(); i++) {
if ( i < rString.Len()) {
switch ( rString.GetChar( i )) {
case '\\': if( i+1 <= rString.Len() ){
@@ -1443,7 +1443,7 @@ XMLUtil& XMLUtil::Instance(){
XMLUtil::~XMLUtil(){}
/*****************************************************************************/
/*****************************************************************************/
-ByteString XMLUtil::GetIsoLangByIndex( USHORT nIndex )
+ByteString XMLUtil::GetIsoLangByIndex( sal_uInt16 nIndex )
/*****************************************************************************/
{
if(nIndex > 0 && MAX_LANGUAGES >= nIndex )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 149fd560fe3b..24d4fbe5985a 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -57,10 +57,10 @@ extern "C" { int YYWarning( char * ); }
#define STATE_ISOCODE99 0x000D
// set of global variables
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bUTF8;
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -78,18 +78,18 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
sInputFileName = "";
sActFileName = "";
Export::sLanguages = "";
bQuiet = false;
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -113,15 +113,15 @@ extern char *GetOutputFile( int argc, char* argv[])
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-L" ) {
nState = STATE_LANGUAGES;
@@ -136,7 +136,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
sInputFileName = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -153,7 +153,7 @@ extern char *GetOutputFile( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = ByteString( argv[ i ]);
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -166,7 +166,7 @@ extern char *GetOutputFile( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
+ bEnableExport = sal_True;
char *pReturn = new char[ sOutputFile.Len() + 1 ];
strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
return pReturn;
@@ -300,8 +300,8 @@ int GetError()
/*****************************************************************************/
XRMResParser::XRMResParser()
/*****************************************************************************/
- : bError( FALSE ),
- bText( FALSE )
+ : bError( sal_False ),
+ bText( sal_False )
{
aLanguages = Export::GetLanguages();
}
@@ -359,7 +359,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
EndOfText( sCurrentOpenTag, sCurrentCloseTag );
ByteString sTmp = sGID;
sGID = "";
- for ( USHORT i = 0; i + 1 < sTmp.GetTokenCount( '.' ); i++ ) {
+ for ( sal_uInt16 i = 0; i + 1 < sTmp.GetTokenCount( '.' ); i++ ) {
if ( sGID.Len())
sGID += ".";
sGID += sTmp.GetToken( i, '.' );
@@ -377,7 +377,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
EndOfText( sCurrentOpenTag, sCurrentCloseTag );
sLID = sNewLID;
}
- bText = TRUE;
+ bText = sal_True;
sCurrentText = "";
sCurrentOpenTag = rToken;
Output( rToken );
@@ -391,7 +391,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
ByteString sLang = GetAttribute( sCurrentOpenTag, "xml:lang" );
if( sLang.EqualsIgnoreCaseAscii("de") ){
- ULONG nLen = 0;
+ sal_uIntPtr nLen = 0;
while ( sCurrentText.Len() != nLen )
{
nLen = sCurrentText.Len();
@@ -407,7 +407,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
//fprintf( stdout, "%s %s\n", sGID.GetBuffer(), sLID.GetBuffer());
//fprintf( stdout, "%s\n\n", sCurrentText.GetBuffer());
- bText = FALSE;
+ bText = sal_False;
}
}
break;
@@ -444,7 +444,7 @@ ByteString XRMResParser::GetAttribute( const ByteString &rToken, const ByteStrin
ByteString sSearch( " " );
sSearch += rAttribute;
sSearch += "=";
- USHORT nPos = sTmp.Search( sSearch );
+ sal_uInt16 nPos = sTmp.Search( sSearch );
if ( nPos != STRING_NOTFOUND ) {
sTmp = sTmp.Copy( nPos );
@@ -717,7 +717,7 @@ void XRMResMerge::EndOfText(
// if ( Export::isAllowed( sCur ) &&
//>>>>>>> 1.17
( pEntrys->GetText(
- sContent, STRING_TYP_TEXT, sCur, TRUE )) &&
+ sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
( sContent != "-" ) && ( sContent.Len()))
{
ByteString sText( sContent );
@@ -737,7 +737,7 @@ void XRMResMerge::EndOfText(
sAdditionalLine += rCloseTag;
sAdditionalLine += "\n";
- for ( USHORT i = 0; i + 1 < GetGID().GetTokenCount( '.' ); i++ )
+ for ( sal_uInt16 i = 0; i + 1 < GetGID().GetTokenCount( '.' ); i++ )
sAdditionalLine += "\t";
Output( sAdditionalLine );