summaryrefslogtreecommitdiff
path: root/l10ntools/inc
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/inc')
-rw-r--r--l10ntools/inc/cfgmerge.hxx6
-rw-r--r--l10ntools/inc/export.hxx169
-rw-r--r--l10ntools/inc/gsicheck.hxx52
-rw-r--r--l10ntools/inc/l10ntools/vosapp.hxx8
-rw-r--r--l10ntools/inc/lngmerge.hxx12
-rw-r--r--l10ntools/inc/srciter.hxx2
-rw-r--r--l10ntools/inc/tagtest.hxx90
-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
11 files changed, 192 insertions, 197 deletions
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx
index 4b13a12bb290..9308d0c727a8 100644
--- a/l10ntools/inc/cfgmerge.hxx
+++ b/l10ntools/inc/cfgmerge.hxx
@@ -113,7 +113,7 @@ protected:
CfgStack aStack;
CfgStackData *pStackData;
- BOOL bLocalize;
+ sal_Bool bLocalize;
virtual void WorkOnText(
ByteString &rText,
@@ -133,7 +133,7 @@ private:
const ByteString &rIsoLang,
const ByteString &rResTyp );
-BOOL IsTokenClosed( const ByteString &rToken );
+sal_Bool IsTokenClosed( const ByteString &rToken );
public:
CfgParser();
@@ -194,7 +194,7 @@ private:
ResData *pResData;
ByteString sFilename;
- BOOL bEnglish;
+ sal_Bool bEnglish;
protected:
void WorkOnText(
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 37524ac7fec6..999eac78ec0a 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -58,7 +58,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;
}
};
@@ -110,11 +110,11 @@ class ExportList
{
private:
ExportListBase maList;
- ULONG nSourceLanguageListEntryCount;
+ sal_uLong nSourceLanguageListEntryCount;
public:
ExportList() { nSourceLanguageListEntryCount = 0; }
- ULONG GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
+ sal_uLong GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
void NewSourceLanguageListEntry() { nSourceLanguageListEntryCount++; }
size_t size() const { return maList.size(); }
void push_back( ExportListEntry* item ) { maList.push_back( item ); }
@@ -147,21 +147,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;
@@ -170,16 +170,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;
@@ -204,14 +204,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 ),
@@ -232,14 +232,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 ),
@@ -303,23 +303,23 @@ private:
ByteString sActPForm; // hold cur. system
- BOOL bDefine; // cur. res. in a define?
- BOOL bNextMustBeDefineEOL; // define but no \ at lineend
- size_t 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_uLong nLevel; // res. recursiv? how deep?
+ sal_uInt16 nList; // cur. res. is String- or FilterList
ByteString nListLang;
- ULONG nListIndex;
- ULONG nListLevel;
+ sal_uLong nListIndex;
+ sal_uLong 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;
@@ -342,7 +342,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 );
@@ -367,7 +367,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();
@@ -378,11 +378,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 );
@@ -399,10 +399,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 );
@@ -411,17 +411,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; }
};
@@ -463,8 +463,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 );
};
@@ -498,7 +498,7 @@ public:
PFormEntrys* GetPFObject( const ByteString& rPFO );
ByteString Dump();
- BOOL operator==( ResData *pData );
+ sal_Bool operator==( ResData *pData );
};
//
@@ -511,39 +511,34 @@ public:
class MergeDataFile
{
-private:
- BOOL bErrorLog;
- ByteString sErrorLog;
- SvFileStream aErrLog;
- ByteStringSet aLanguageSet;
+ private:
+ sal_Bool bErrorLog;
+ ByteString sErrorLog;
+ SvFileStream aErrLog;
MergeDataHashMap aMap;
- ByteStringHashMap aLanguageMap;
- std::vector<ByteString> aLanguageList;
- ByteStringHashMap aFilenames;
-
+ std::set<ByteString> aLanguageSet;
-public:
- MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
- ~MergeDataFile();
+ MergeData *GetMergeData( ResData *pResData , bool bCaseSensitve = false );
+ void InsertEntry( const ByteString &rTYP, const ByteString &rGID, const ByteString &rLID,
+ const ByteString &rPFO,
+ const ByteString &nLang, const ByteString &rTEXT,
+ const ByteString &rQHTEXT, const ByteString &rTITLE,
+ const ByteString &sFilename, bool bCaseSensitive
+ );
+ ByteString Dump();
+ void WriteError( const ByteString &rLine );
+ public:
+ MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
+ ~MergeDataFile();
- std::vector<ByteString> GetLanguages();
- MergeData *GetMergeData( ResData *pResData , bool bCaseSensitve = false );
- PFormEntrys *GetPFormEntrys( ResData *pResData );
- PFormEntrys *GetPFormEntrysCaseSensitive( ResData *pResData );
+ std::vector<ByteString> GetLanguages();
- void InsertEntry( const ByteString &rTYP, const ByteString &rGID, const ByteString &rLID,
- const ByteString &rPFO,
- const ByteString &nLang , const ByteString &rTEXT,
- const ByteString &rQHTEXT, const ByteString &rTITLE ,
- const ByteString &sFilename , bool bCaseSensitive
- );
- static USHORT GetLangIndex( USHORT nId );
- static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false );
+ PFormEntrys *GetPFormEntrys( ResData *pResData );
+ PFormEntrys *GetPFormEntrysCaseSensitive( ResData *pResData );
- ByteString Dump();
- void WriteError( const ByteString &rLine );
+ static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false );
};
diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx
index 660ddadd303a..971f85016fbd 100644
--- a/l10ntools/inc/gsicheck.hxx
+++ b/l10ntools/inc/gsicheck.hxx
@@ -43,7 +43,7 @@ private:
ParserMessageList aMessages;
LineFormat aFormat;
- ULONG nLineNumber;
+ sal_uLong nLineNumber;
ByteString aUniqId;
ByteString aLineType;
@@ -52,15 +52,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_uLong nLine );
LineFormat GetLineFormat() const { return aFormat; }
- ULONG GetLineNumber() const { return nLineNumber; }
+ sal_uLong GetLineNumber() const { return nLineNumber; }
ByteString const GetUniqId() const { return aUniqId; }
ByteString const GetLineType() const { return aLineType; }
@@ -76,13 +76,13 @@ public:
void SetTitle( ByteString &aNew ) { aTitle = aNew; ReassembleLine(); }
ParserMessageList* GetMessageList() { return &aMessages; };
- BOOL HasMessages(){ return ( !aMessages.empty() ); };
+ sal_Bool HasMessages(){ return ( aMessages.size() > 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; };
};
//
@@ -100,31 +100,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_uLong nLine, ByteString aUniqueId = ByteString() );
+ void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uLong 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_uLong 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 e45840b4f9df..e8e97fb71fef 100644
--- a/l10ntools/inc/l10ntools/vosapp.hxx
+++ b/l10ntools/inc/l10ntools/vosapp.hxx
@@ -10,18 +10,18 @@
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()
{
return osl_getCommandArgCount();
}
-XubString Application::GetCommandLineParam( USHORT nParam )
+XubString Application::GetCommandLineParam( sal_uInt16 nParam )
{
rtl::OUString aParam;
osl_getCommandArg( nParam, &aParam.pData );
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 7dbe884bb868..8aaf98d3d782 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -45,11 +45,11 @@ typedef ::std::vector< ByteString* > LngLineList;
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;
@@ -60,11 +60,11 @@ private:
const ByteString &rPrj ,
const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
public:
- LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat );
+ LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat );
~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 );
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/inc/srciter.hxx b/l10ntools/inc/srciter.hxx
index 6583381359a4..c859d2356c1a 100644
--- a/l10ntools/inc/srciter.hxx
+++ b/l10ntools/inc/srciter.hxx
@@ -50,7 +50,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 f905ec627d72..1a41f508533f 100644
--- a/l10ntools/inc/tagtest.hxx
+++ b/l10ntools/inc/tagtest.hxx
@@ -35,9 +35,9 @@
class GSILine;
-typedef USHORT TokenId;
+typedef sal_uInt16 TokenId;
-#define TOK_INVALIDPOS USHORT( 0xFFFF )
+#define TOK_INVALIDPOS sal_uInt16( 0xFFFF )
class ParserMessage;
typedef ::std::vector< ParserMessage* > Impl_ParserMessageList;
@@ -71,24 +71,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;
@@ -97,25 +97,25 @@ 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; }
};
@@ -126,10 +126,10 @@ private:
public:
~ParserMessageList() { clear(); }
- 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();
bool empty() const { return maList.empty(); }
size_t size() const { return maList.size(); }
ParserMessage* operator [] ( size_t i ) { return ( i < maList.size() ) ? maList[ i ] : NULL; }
@@ -261,54 +261,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();
@@ -320,9 +320,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();
@@ -338,7 +338,7 @@ class TokenParser
TokenId nPfCaseOptions;
TokenId nAppCaseOptions;
- BOOL bPfCaseActive ,bAppCaseActive;
+ sal_Bool bPfCaseActive ,bAppCaseActive;
TokenId nActiveRefTypes;
@@ -356,15 +356,15 @@ 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& GetCompareWarnings(){ return aCompareWarningList; }
- BOOL HasCompareWarnings(){ return ( !aCompareWarningList.empty() ); }
+ sal_Bool HasCompareWarnings(){ return ( !aCompareWarningList.empty() ); }
String GetFixedTestee(){ return aFixedTestee; }
};
diff --git a/l10ntools/inc/wtranode.hxx b/l10ntools/inc/wtranode.hxx
index 6283f4ea0c93..b2c10e07d2d2 100644
--- a/l10ntools/inc/wtranode.hxx
+++ b/l10ntools/inc/wtranode.hxx
@@ -81,7 +81,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:
@@ -103,7 +103,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 a658d27fd1ee..c06be49b183c 100644
--- a/l10ntools/inc/wtratree.hxx
+++ b/l10ntools/inc/wtratree.hxx
@@ -82,7 +82,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
@@ -133,7 +133,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 5a25b3d65959..9f67e7343633 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -86,7 +86,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
)
{
@@ -106,7 +106,7 @@ protected:
XMLNode() {}
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
virtual ~XMLNode() {}
};
@@ -125,7 +125,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; }
@@ -161,7 +161,7 @@ protected:
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
/// returns child list of this node
XMLChildNodeList *GetChildList() { return pChildList; }
@@ -198,7 +198,7 @@ typedef boost::unordered_map<ByteString , LangHashMap* ,
typedef boost::unordered_map<ByteString, int, hashByteString,equalByteString> HashMap;
/// Mapping XML tag names <-> have localizable strings
-typedef boost::unordered_map<ByteString , BOOL ,
+typedef boost::unordered_map<ByteString , sal_Bool ,
hashByteString,equalByteString> TagMap;
/** Holds information of a XML file, is root node of tree
@@ -216,7 +216,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();
@@ -224,14 +224,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; }
@@ -272,10 +272,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();
@@ -341,7 +341,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; }
@@ -411,7 +411,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; }
@@ -443,7 +443,7 @@ public:
)
: XMLChildNode( Parent ), sComment( rComment ) {}
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
XMLComment( const XMLComment& obj );
@@ -475,7 +475,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; }
@@ -487,8 +487,8 @@ public:
*/
struct XMLError {
XML_Error eCode; // the error code
- ULONG nLine; // error line number
- ULONG nColumn; // error column number
+ sal_uLong nLine; // error line number
+ sal_uLong nColumn; // error column number
String sMessage; // readable error message
};
diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx
index 7be4d5dc70d0..f0b213a54ce3 100644
--- a/l10ntools/inc/xrmmerge.hxx
+++ b/l10ntools/inc/xrmmerge.hxx
@@ -39,8 +39,8 @@ private:
ByteString sGID;
ByteString sLID;
- BOOL bError;
- BOOL bText;
+ sal_Bool bError;
+ sal_Bool bText;
bool sLocalized;
@@ -75,8 +75,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; }
};
//