summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-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
-rw-r--r--l10ntools/layout/layoutparse.cxx2
-rw-r--r--l10ntools/layout/layoutparse.hxx2
-rw-r--r--l10ntools/layout/tralay.cxx4
-rwxr-xr-x[-rw-r--r--]l10ntools/scripts/localize.pl2
-rw-r--r--l10ntools/scripts/tool/l10ntool.py10
-rwxr-xr-xl10ntools/scripts/xhtex8
-rwxr-xr-xl10ntools/scripts/xtxex8
-rw-r--r--l10ntools/source/cfgmerge.cxx64
-rw-r--r--l10ntools/source/directory.cxx6
-rw-r--r--l10ntools/source/export.cxx344
-rw-r--r--l10ntools/source/export2.cxx18
-rw-r--r--l10ntools/source/filter/utils/Cache.java8
-rw-r--r--l10ntools/source/gsicheck.cxx238
-rw-r--r--l10ntools/source/gsiconv.cxx26
-rw-r--r--l10ntools/source/help/HelpLinker.cxx68
-rw-r--r--l10ntools/source/helpex.cxx48
-rw-r--r--l10ntools/source/helpmerge.cxx6
-rw-r--r--l10ntools/source/lngex.cxx44
-rw-r--r--l10ntools/source/lngmerge.cxx28
-rw-r--r--l10ntools/source/localize.cxx96
-rw-r--r--l10ntools/source/merge.cxx296
-rw-r--r--l10ntools/source/srciter.cxx16
-rw-r--r--l10ntools/source/tagtest.cxx234
-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.cxx44
-rw-r--r--l10ntools/source/xrmmerge.cxx48
39 files changed, 992 insertions, 1087 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; }
};
//
diff --git a/l10ntools/layout/layoutparse.cxx b/l10ntools/layout/layoutparse.cxx
index 2d0e2f51b7f5..d3d80b6e95af 100644
--- a/l10ntools/layout/layoutparse.cxx
+++ b/l10ntools/layout/layoutparse.cxx
@@ -121,7 +121,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 454ff0926bd0..a9155eaa7503 100644
--- a/l10ntools/layout/layoutparse.hxx
+++ b/l10ntools/layout/layoutparse.hxx
@@ -39,7 +39,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 3ae549a38c97..2fe0d898c759 100644
--- a/l10ntools/layout/tralay.cxx
+++ b/l10ntools/layout/tralay.cxx
@@ -114,7 +114,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 )
@@ -274,7 +274,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/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 7249814febc7..ba9944f0076f 100644..100755
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -175,7 +175,7 @@ sub splitfile{
exit( -1 );
}
my $src_root = $ENV{SOURCE_ROOT_DIR};
- my $ooo_src_root = $ENV{SRC_ROOT};
+ my $ooo_src_root = $src_root."/l10n/l10n";
my $so_l10n_path = $src_root."/sun/l10n_so/source";
my $ooo_l10n_path = $ooo_src_root."/l10n/source";
diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py
index d8933331cf3f..6b1a75c775d4 100644
--- a/l10ntools/scripts/tool/l10ntool.py
+++ b/l10ntools/scripts/tool/l10ntool.py
@@ -116,6 +116,16 @@ class AbstractL10nTool:
return self._options.inputfile[0] == '@'
def copy_file(self, inputfilename, outputfilename):
+ try:
+ os.remove(outputfilename)
+ except:
+ pass
+
+ try:
+ os.remove(outputfilename)
+ except:
+ pass
+
try:
shutil.copy(inputfilename, outputfilename)
except IOError:
diff --git a/l10ntools/scripts/xhtex b/l10ntools/scripts/xhtex
index d337694c589b..5409f179777d 100755
--- a/l10ntools/scripts/xhtex
+++ b/l10ntools/scripts/xhtex
@@ -31,8 +31,16 @@ if [ x${SOLARENV}x = xx ]; then
exit 1
fi
+if [ ${GUI} = "WNT" ]; then
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
exec python $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
else
exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
fi
+else
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec python $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
+else
+ exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
+fi
+fi
diff --git a/l10ntools/scripts/xtxex b/l10ntools/scripts/xtxex
index 01a70ae57d80..39da89fd81ce 100755
--- a/l10ntools/scripts/xtxex
+++ b/l10ntools/scripts/xtxex
@@ -31,9 +31,17 @@ if [ x${SOLARENV}x = xx ]; then
exit 1
fi
+if [ ${GUI} = "WNT" ]; then
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
exec python $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
else
exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
fi
+else
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec python $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
+else
+ exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
+fi
+fi
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 5e55e5823a79..5a007c175216 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -55,11 +55,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;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sInputFileName;
@@ -78,18 +78,18 @@ 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;
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++ ) {
@@ -113,19 +113,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 == "-L" ) {
nState = STATE_LANGUAGES;
@@ -140,7 +140,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: {
@@ -158,7 +158,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: {
@@ -171,7 +171,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;
@@ -355,7 +355,7 @@ CfgStackData *CfgStack::GetStackData( size_t nPos )
CfgParser::CfgParser()
/*****************************************************************************/
: pStackData( NULL ),
- bLocalize( FALSE )
+ bLocalize( sal_False )
{
}
@@ -367,7 +367,7 @@ CfgParser::~CfgParser()
/*****************************************************************************/
-BOOL CfgParser::IsTokenClosed( const ByteString &rToken )
+sal_Bool CfgParser::IsTokenClosed( const ByteString &rToken )
/*****************************************************************************/
{
return rToken.GetChar( rToken.Len() - 2 ) == '/';
@@ -381,7 +381,7 @@ void CfgParser::AddText(
)
/*****************************************************************************/
{
- USHORT nTextLen = 0;
+ sal_uInt16 nTextLen = 0;
while ( rText.Len() != nTextLen ) {
nTextLen = rText.Len();
rText.SearchAndReplaceAll( "\n", " " );
@@ -414,7 +414,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:
@@ -446,7 +446,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=";
@@ -466,7 +466,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;
@@ -484,7 +484,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" ) {
@@ -521,11 +521,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;
}
@@ -723,7 +723,7 @@ CfgMerge::CfgMerge(
pMergeDataFile( NULL ),
pResData( NULL ),
sFilename( rFilename ),
- bEnglish( FALSE )
+ bEnglish( sal_False )
{
if ( rMergeSource.Len()){
pMergeDataFile = new MergeDataFile(
@@ -773,7 +773,7 @@ void CfgMerge::WorkOnText(
}
if (( nLangIndex.EqualsIgnoreCaseAscii("en-US") ))
- bEnglish = TRUE;
+ bEnglish = sal_True;
PFormEntrys *pEntrys = pMergeDataFile->GetPFormEntrysCaseSensitive( pResData );
if ( pEntrys ) {
@@ -821,7 +821,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("en-US") ) &&
@@ -862,7 +862,7 @@ void CfgMerge::WorkOnRessourceEnd()
}
delete pResData;
pResData = NULL;
- bEnglish = FALSE;
+ bEnglish = sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index dbe7f67a0b1a..05823c74ba14 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 1c91379d3587..e3ee7aee552a 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -58,12 +58,12 @@ Export *pExport = 0L;
// set of global variables
typedef ::std::vector< ByteString* > FileList;
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;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sActFileName;
@@ -86,12 +86,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[])
Export::sForcedLanguages = "";
sTempFile = "";
pTempFile = NULL;
- 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++ ) {
@@ -124,24 +124,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;
@@ -153,7 +153,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
aInputFileList.push_back( new ByteString( argv[ i ] ) );
- bInput = TRUE; // min. one source file found
+ bInput = sal_True; // min. one source file found
}
break;
case STATE_OUTPUT: {
@@ -170,7 +170,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: {
@@ -183,7 +183,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;
@@ -326,7 +326,7 @@ int GetError()
// get error at global instance of class Export
if ( pExport->GetError())
return 1;
- return FALSE;
+ return sal_False;
}
}
@@ -372,7 +372,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 )
@@ -396,10 +396,10 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
sId.EraseTrailingChars( '\t' );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//
@@ -407,14 +407,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 ),
@@ -424,9 +424,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 );
@@ -451,15 +451,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 ),
@@ -468,11 +468,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;
@@ -497,8 +497,8 @@ 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 );
@@ -536,16 +536,16 @@ int Export::Execute( int nToken, const char * pToken )
ByteString sToken( pToken );
ByteString sOrig( sToken );
- 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" )))) {
@@ -589,16 +589,16 @@ 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 ) {
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;
@@ -612,12 +612,12 @@ int Export::Execute( int nToken, const char * pToken )
}
}
- 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;
@@ -625,7 +625,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;
@@ -634,7 +634,7 @@ int Export::Execute( int nToken, const char * pToken )
}
if ( nOpen < nClose )
- bExecuteDown = TRUE;
+ bExecuteDown = sal_True;
}
switch ( nToken ) {
@@ -653,17 +653,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[ nLevel - 2 ]->bChild = TRUE;
+ aResStack[ nLevel - 2 ]->bChild = sal_True;
}
// create new instance for this res. and fill mandatory fields
@@ -700,12 +700,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[ nLevel - 2 ]->bChild = TRUE;
+ aResStack[ nLevel - 2 ]->bChild = sal_True;
}
// create new instance for this res. and fill mandatory fields
@@ -728,13 +728,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[ nLevel - 2 ]->bChild = TRUE;
+ aResStack[ nLevel - 2 ]->bChild = sal_True;
}
ResData *pNewData = new ResData( sActPForm, FullId() , sFilename );
@@ -745,11 +745,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 );
ResStack::iterator it = aResStack.begin();
@@ -761,7 +761,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 );
@@ -773,7 +773,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( ' ' );
@@ -788,21 +788,21 @@ int Export::Execute( int nToken, const char * pToken )
pResData->sHelpId = sValue;
}
else if ( sKey == "STRINGLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_STRING;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
nListLevel = 0;
}
else if ( sKey == "FILTERLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_FILTER;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
nListLevel = 0;
}
else if ( sKey == "UIENTRIES" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_UIENTRIES;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
@@ -817,10 +817,10 @@ int Export::Execute( int nToken, const char * pToken )
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("[en-us]=");
if( nPos != STRING_NOTFOUND ) {
ByteString sKey = sTmpToken.Copy( 0 , nPos );
@@ -829,14 +829,14 @@ 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;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
nListLevel = 0;
}
else if ( sKey == "FILTERLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_FILTER;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
@@ -844,7 +844,7 @@ int Export::Execute( int nToken, const char * pToken )
}
// PairedList
else if ( sKey == "PAIREDLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_PAIRED;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
@@ -852,14 +852,14 @@ int Export::Execute( int nToken, const char * pToken )
}
else if ( sKey == "ITEMLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_ITEM;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
nListLevel = 0;
}
else if ( sKey == "UIENTRIES" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_UIENTRIES;
nListLang = SOURCE_LANGUAGE;
nListIndex = 0;
@@ -911,7 +911,7 @@ int Export::Execute( int nToken, const char * pToken )
break;
case LONGTEXTLINE:
case TEXTLINE:
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nLevel ) {
CutComment( sToken );
@@ -940,7 +940,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 );
@@ -956,7 +956,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else if ( sKey == "HELPTEXT" ) {
SetChildWithText();
- pResData->bHelpText = TRUE;
+ pResData->bHelpText = sal_True;
if ( bBreakWhenHelpText ) {
ByteString sError( "\"HelpText\" found in source\n" );
YYWarning( sError.GetBufferAccess());
@@ -976,7 +976,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else if ( sKey == "QUICKHELPTEXT" ) {
SetChildWithText();
- pResData->bQuickHelpText = TRUE;
+ pResData->bQuickHelpText = sal_True;
if ( bMergeMode )
PrepareTextToMerge( sOrig, STRING_TYP_QUICKHELPTEXT, nLangIndex, pResData );
else {
@@ -990,7 +990,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else if ( sKey == "TITLE" ) {
SetChildWithText();
- pResData->bTitle = TRUE;
+ pResData->bTitle = sal_True;
if ( bMergeMode )
PrepareTextToMerge( sOrig, STRING_TYP_TITLE, nLangIndex, pResData );
else {
@@ -1012,11 +1012,11 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case NEWTEXTINRES: {
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
}
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, '=' );
@@ -1028,18 +1028,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 ) {};
@@ -1068,23 +1068,23 @@ 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, "" );
}
}
break;
case PRAGMA : {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {};
sToken.EraseLeadingChars( ' ' );
@@ -1107,14 +1107,14 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case TEXTREFID : {
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
}
}
if ( bWriteToMerged ) {
// 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++ );
}
@@ -1137,8 +1137,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 ) == '\"' )
@@ -1157,8 +1157,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;
@@ -1168,7 +1168,7 @@ void Export::UnmergeUTF8( ByteString& sOrig ){
}
/*****************************************************************************/
-BOOL Export::ListExists( ResData *pResData, USHORT nLst )
+sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst )
/*****************************************************************************/
{
switch ( nLst ) {
@@ -1178,20 +1178,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;
// mandatory to export: en-US
@@ -1321,7 +1321,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 ; > ;
@@ -1349,8 +1349,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;
@@ -1416,7 +1416,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
if ( bCreateNew )
delete pExportList;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -1554,7 +1554,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 ) == '\\' ) ||
@@ -1592,14 +1592,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 ) {
@@ -1654,7 +1654,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++ );
@@ -1662,7 +1662,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++ );
}
@@ -1670,7 +1670,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;
@@ -1678,13 +1678,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 );
@@ -1701,11 +1701,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()) {
@@ -1754,13 +1754,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;
@@ -1775,7 +1775,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
case LIST_ITEM :
{
if ( bUnmerge )
- return TRUE;
+ return sal_True;
ExportList *pList = NULL;
switch ( nTyp ) {
@@ -1819,17 +1819,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 --;
@@ -1860,14 +1860,14 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
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 ++;
}
@@ -1875,19 +1875,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 --;
@@ -1915,18 +1915,18 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
if ( !pEntrys ) {
rText = sOrigText;
- return FALSE; // no data found
+ return sal_False; // no data found
}
ByteString sContent;
pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex );
if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
rText = sOrigText;
- return FALSE; // no data found
+ return sal_False; // no data found
}
if ( Export::isSourceLanguage( nLangIndex ) ) {
- return FALSE;
+ return sal_False;
}
ByteString sPostFix( rText.Copy( ++nEnd ));
@@ -1940,11 +1940,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 ( !pMergeDataFile ){
@@ -1964,8 +1964,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;
@@ -1973,7 +1973,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) {
@@ -1982,7 +1982,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += pResData->sTextTyp;
if ( ! Export::isSourceLanguage( sCur ) ) {
@@ -2002,8 +2002,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 );
}
@@ -2017,15 +2017,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) {
@@ -2034,7 +2034,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += "QuickHelpText";
if ( ! Export::isSourceLanguage( sCur ) ) {
@@ -2050,8 +2050,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 );
}
@@ -2063,15 +2063,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) {
@@ -2080,7 +2080,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += "Title";
if ( ! Export::isSourceLanguage( sCur ) ) {
@@ -2096,8 +2096,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 );
}
@@ -2118,9 +2118,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;
@@ -2132,7 +2132,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 ) ){
@@ -2143,17 +2143,17 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
pResData->sId = ByteString("1");
PFormEntrys *pEntrys;
- ULONG nLIndex = 0;
- ULONG nMaxIndex = 0;
+ sal_uLong nLIndex = 0;
+ sal_uLong nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
pEntrys = pMergeDataFile->GetPFormEntrys( pResData );
while( pEntrys && ( nLIndex < nMaxIndex )) {
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 && bPairedList ){
@@ -2214,7 +2214,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
}
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
nStart = sLine.Search( "\"" );
ByteString sPostFix;
@@ -2297,7 +2297,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
nListIndex++;
- ULONG nMaxIndex = 0;
+ sal_uLong nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
ByteString sLine;
@@ -2322,7 +2322,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++;
@@ -2353,13 +2353,13 @@ void Export::SetChildWithText()
{
if ( aResStack.size() > 1 ) {
for ( size_t i = 0; i < aResStack.size() - 1; i++ ) {
- aResStack[ i ]->bChildWithText = TRUE;
+ aResStack[ i ]->bChildWithText = sal_True;
}
}
}
void ParserQueue::Push( const QueueEntry& aEntry ){
- 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 8dea46fe8a24..5659123304c8 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -147,7 +147,7 @@ void Export::QuotHTMLXRM( 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 ) != '>' ) {
@@ -215,7 +215,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 ) != '>' ) {
@@ -418,7 +418,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 ) ){}
@@ -435,7 +435,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 ) ){}
@@ -556,7 +556,7 @@ ByteString Export::GetTimeStamp()
}
/*****************************************************************************/
-BOOL Export::ConvertLineEnds(
+sal_Bool Export::ConvertLineEnds(
ByteString sSource, ByteString sDestination )
/*****************************************************************************/
{
@@ -565,11 +565,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;
@@ -587,7 +587,7 @@ BOOL Export::ConvertLineEnds(
aSource.Close();
aDestination.Close();
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -597,7 +597,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/filter/utils/Cache.java b/l10ntools/source/filter/utils/Cache.java
index 02bb1c302d8d..a8fbaaa953a9 100644
--- a/l10ntools/source/filter/utils/Cache.java
+++ b/l10ntools/source/filter/utils/Cache.java
@@ -159,7 +159,6 @@ public class Cache
private static final java.lang.String FLAGNAME_PACKED = "PACKED";
private static final java.lang.String FLAGNAME_PREFERRED = "PREFERRED";
private static final java.lang.String FLAGNAME_READONLY = "READONLY";
- private static final java.lang.String FLAGNAME_SILENTEXPORT = "SILENTEXPORT";
private static final java.lang.String FLAGNAME_TEMPLATE = "TEMPLATE";
private static final java.lang.String FLAGNAME_TEMPLATEPATH = "TEMPLATEPATH";
private static final java.lang.String FLAGNAME_USESOPTIONS = "USESOPTIONS";
@@ -185,7 +184,6 @@ public class Cache
private static final int FLAGVAL_PACKED = 0x00100000; // 1048576
private static final int FLAGVAL_PREFERRED = 0x10000000; // 268435456
private static final int FLAGVAL_READONLY = 0x00010000; // 65536
- private static final int FLAGVAL_SILENTEXPORT = 0x00200000; // 2097152
private static final int FLAGVAL_TEMPLATE = 0x00000004; // 4
private static final int FLAGVAL_TEMPLATEPATH = 0x00000010; // 16
private static final int FLAGVAL_USESOPTIONS = 0x00000080; // 128
@@ -1358,9 +1356,6 @@ public class Cache
if (sFlagName.equals(FLAGNAME_READONLY))
nFlags |= FLAGVAL_READONLY;
else
- if (sFlagName.equals(FLAGNAME_SILENTEXPORT))
- nFlags |= FLAGVAL_SILENTEXPORT;
- else
if (sFlagName.equals(FLAGNAME_TEMPLATE))
nFlags |= FLAGVAL_TEMPLATE;
else
@@ -1455,9 +1450,6 @@ public class Cache
if((field & FLAGVAL_PACKED) == FLAGVAL_PACKED)
lFlags.add(FLAGNAME_PACKED);
- if((field & FLAGVAL_SILENTEXPORT) == FLAGVAL_SILENTEXPORT)
- lFlags.add(FLAGNAME_SILENTEXPORT);
-
if((field & FLAGVAL_BROWSERPREFERRED) == FLAGVAL_BROWSERPREFERRED)
lFlags.add(FLAGNAME_BROWSERPREFERRED);
diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx
index 62bd546fb7ac..7c5c0b9bef40 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_uLong 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_uLong 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_uLong 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 );
@@ -213,7 +213,7 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
void GSILine::NotOK()
/*****************************************************************************/
{
- bOK = FALSE;
+ bOK = sal_False;
}
/*****************************************************************************/
@@ -223,7 +223,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' ) );
@@ -245,8 +245,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
@@ -273,17 +273,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 )
@@ -293,7 +293,7 @@ GSIBlock::GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, B
, bReference( bRef )
, bAllowKeyIDs( bAllowKID )
, bAllowSuspicious( bAllowSusp )
- , bHasBlockError( FALSE )
+ , bHasBlockError( sal_False )
{
}
@@ -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();
}
@@ -336,7 +336,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
if ( maList[ nPos ]->GetLanguageId().Equals( pLine->GetLanguageId() ) )
{
PrintError( "Translation Language entry double. Checking both.", "File format", "", pLine->GetLineNumber(), pLine->GetUniqId() );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
maList[ nPos ]->NotOK();
pLine->NotOK();
}
@@ -355,7 +355,7 @@ void GSIBlock::SetReferenceLine( GSILine* pLine )
/*****************************************************************************/
void GSIBlock::PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
- ByteString aContext, ULONG nLine, ByteString aUniqueId )
+ ByteString aContext, sal_uLong nLine, ByteString aUniqueId )
/*****************************************************************************/
{
::PrintMessage( aType, aMsg, aPrefix, aContext, bPrintContext, nLine, aUniqueId );
@@ -363,7 +363,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_uLong nLine, ByteString aUniqueId )
/*****************************************************************************/
{
PrintMessage( "Error:", aMsg, aPrefix, aContext, nLine, aUniqueId );
@@ -393,7 +393,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 );
@@ -402,7 +402,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"
@@ -410,25 +410,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 )
@@ -443,7 +443,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;
@@ -451,7 +451,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;
@@ -459,7 +459,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();
@@ -473,12 +473,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;
}
}
}
@@ -488,7 +488,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 )
@@ -497,32 +497,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 );
@@ -533,7 +533,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 );
@@ -544,7 +544,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 );
@@ -558,38 +558,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_uLong 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
@@ -599,7 +599,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
{
PrintList( pSourceLine->GetMessageList(), "ReferenceString", pSourceLine );
pSourceLine->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
}
}
if ( bReference )
@@ -615,7 +615,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
{
@@ -626,7 +626,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;
}
}
}
@@ -642,7 +642,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
{
if ( pItem->HasMessages() || aTester.GetCompareWarnings().HasErrors() )
pItem->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
PrintList( pItem->GetMessageList(), "Translation", pItem );
PrintList( &(aTester.GetCompareWarnings()), "Translation Tag Mismatch", pItem );
}
@@ -654,19 +654,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;
+ sal_Bool bHasError = sal_False;
+ sal_Bool bCopyAll = ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) || bHasBlockError;
for ( size_t i = 0, n = maList.size(); i < n; ++i )
{
GSILine* pItem = maList[ i ];
if ( !pItem->IsOK() || bCopyAll )
{
- bHasError = TRUE;
+ bHasError = sal_True;
aErrOut.LazyOpen();
aErrOut.WriteLine( *pItem );
}
@@ -679,18 +679,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;
+ sal_Bool bHasOK = sal_False;
for ( size_t i = 0, n = maList.size(); i < n; ++i )
{
GSILine* pItem = maList[ i ];
if ( ( pItem->IsOK() || bCheckSourceLang ) && !bHasBlockError )
{
- bHasOK = TRUE;
+ bHasOK = sal_True;
aOkOut.LazyOpen();
aOkOut.WriteLine( *pItem );
}
@@ -703,18 +703,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;
+ sal_Bool bHasFixes = sal_False;
for ( size_t i = 0, n = maList.size(); i < n; ++i )
{
GSILine* pItem = maList[ i ];
if ( pItem->IsFixed() )
{
- bHasFixes = TRUE;
+ bHasFixes = sal_True;
aFixOut.LazyOpen();
aFixOut.WriteLine( *pItem );
}
@@ -783,31 +783,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':
{
@@ -817,61 +817,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':
{
@@ -885,7 +885,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;
@@ -894,34 +894,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
@@ -931,7 +931,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;
}
}
}
@@ -1031,20 +1031,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_uLong 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_uLong 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() )
@@ -1055,7 +1055,7 @@ int _cdecl main( int argc, char *argv[] )
pGSILine->NotOK();
if ( bWriteError )
{
- bFileHasError = TRUE;
+ bFileHasError = sal_True;
aErrOut.LazyOpen();
aErrOut.WriteLine( *pGSILine );
}
@@ -1094,7 +1094,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 )
@@ -1112,7 +1112,7 @@ int _cdecl main( int argc, char *argv[] )
}
else if ( pReferenceLine->GetUniqId() > aId )
{
- bContinueSearching = FALSE;
+ bContinueSearching = sal_False;
}
else
{
@@ -1134,7 +1134,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 f06104175c0d..7fd345b6e3aa 100644
--- a/l10ntools/source/gsiconv.cxx
+++ b/l10ntools/source/gsiconv.cxx
@@ -40,12 +40,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_uLong nPos( rStream.Tell());
rStream.Seek( STREAM_SEEK_TO_BEGIN );
ByteString sLine;
@@ -65,7 +65,7 @@ USHORT GetGSIFileType( SvStream &rStream )
}
/*****************************************************************************/
-ByteString GetGSILineId( const ByteString &rLine, USHORT nFileType )
+ByteString GetGSILineId( const ByteString &rLine, sal_uInt16 nFileType )
/*****************************************************************************/
{
ByteString sId;
@@ -90,7 +90,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;
@@ -109,8 +109,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 ) {
@@ -123,7 +123,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 )
@@ -232,9 +232,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_uLong nMaxLines = (sal_uLong) ByteString( argv[ 2 ] ).ToInt64();
if ( !nMaxLines ) {
fprintf( stderr, "\nERROR: Linecount must be at least 1!\n\n" );
exit ( 3 );
@@ -242,8 +242,8 @@ int _cdecl main( int argc, char *argv[] )
ByteString sGSILine;
ByteString sOldId;
- ULONG nLine = 0;
- ULONG nOutputFile = 1;
+ sal_uLong nLine = 0;
+ sal_uLong nOutputFile = 1;
String sOutput( sBase );
sOutput += String( "_", RTL_TEXTENCODING_ASCII_US );
@@ -346,7 +346,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/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index a8eec6909914..32de3cc5efeb 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -51,17 +51,16 @@
#define DBHELP_ONLY
-
class IndexerPreProcessor
{
private:
- std::string m_aModuleName;
- fs::path m_fsIndexBaseDir;
- fs::path m_fsCaptionFilesDirName;
- fs::path m_fsContentFilesDirName;
+ std::string m_aModuleName;
+ fs::path m_fsIndexBaseDir;
+ fs::path m_fsCaptionFilesDirName;
+ fs::path m_fsContentFilesDirName;
- xsltStylesheetPtr m_xsltStylesheetPtrCaption;
- xsltStylesheetPtr m_xsltStylesheetPtrContent;
+ xsltStylesheetPtr m_xsltStylesheetPtrCaption;
+ xsltStylesheetPtr m_xsltStylesheetPtrContent;
public:
IndexerPreProcessor( const std::string& aModuleName, const fs::path& fsIndexBaseDir,
@@ -250,7 +249,6 @@ class HelpLinker
{
public:
void main(std::vector<std::string> &args,
-// std::string* pExtensionPath = NULL, const rtl::OUString* pOfficeHelpPath = NULL )
std::string* pExtensionPath = NULL,
std::string* pDestination = NULL,
const rtl::OUString* pOfficeHelpPath = NULL )
@@ -278,12 +276,10 @@ private:
std::string extdestination;
std::string module;
std::string lang;
- std::string hid;
std::string extensionPath;
std::string extensionDestination;
bool bExtensionMode;
fs::path indexDirName;
- Stringtable hidlistTranslation;
fs::path indexDirParentName;
bool init;
IndexerPreProcessor* m_pIndexerPreProcessor;
@@ -324,13 +320,6 @@ void HelpLinker::addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishi
HCDBG(std::cerr << "HelpLinker::addBookmark " << thishid << " " <<
fileB << " " << anchorB << " " << jarfileB << " " << titleB << std::endl);
- std::string temp = thishid;
- std::transform (temp.begin(), temp.end(), temp.begin(), toupper);
- std::replace(temp.begin(), temp.end(), ':', '_');
- const std::string& translatedHid = hidlistTranslation[temp];
- if (!translatedHid.empty())
- thishid = translatedHid;
-
thishid = URLEncoder::encode(thishid);
DBT key;
@@ -464,20 +453,6 @@ void HelpLinker::link() throw( HelpProcessingException )
try
{
- std::ifstream fileReader(hid.c_str());
- while (fileReader)
- {
- std::string key;
- fileReader >> key;
- std::transform (key.begin(), key.end(), key.begin(), toupper);
- std::replace(key.begin(), key.end(), ':', '_');
- std::string data;
- fileReader >> data;
- if (!key.empty() && !data.empty())
- hidlistTranslation[key] = data;
- }
- fileReader.close();
-
// lastly, initialize the indexBuilder
if ( (!bExtensionMode || bIndexForExtension) && !helpFiles.empty())
initIndexerPreProcessor();
@@ -636,13 +611,6 @@ void HelpLinker::link() throw( HelpProcessingException )
std::string helpTextId = helpTextIter->first;
const std::string& helpTextText = helpTextIter->second;
- std::string temp = helpTextId;
- std::transform (temp.begin(), temp.end(), temp.begin(), toupper);
- std::replace(temp.begin(), temp.end(), ':', '_');
-
- const std::string& tHid = hidlistTranslation[temp];
- if (!tHid.empty())
- helpTextId = tHid;
helpTextId = URLEncoder::encode(helpTextId);
DBT keyDbt;
@@ -682,8 +650,8 @@ void HelpLinker::link() throw( HelpProcessingException )
if( !bExtensionMode )
std::cout << std::endl;
- } // try
- catch( HelpProcessingException& )
+ } // try
+ catch( const HelpProcessingException& )
{
// catch HelpProcessingException to avoid locking data bases
#ifndef DBHELP_ONLY
@@ -887,14 +855,7 @@ void HelpLinker::main( std::vector<std::string> &args,
else if (args[i].compare("-hid") == 0)
{
++i;
- if (i >= args.size())
- {
- std::stringstream aStrStream;
- aStrStream << "hid list missing" << std::endl;
- throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
- }
-
- hid = args[i];
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, "obsolete -hid argument used" );
}
else if (args[i].compare("-add") == 0)
{
@@ -1051,13 +1012,6 @@ void HelpLinker::main( std::vector<std::string> &args,
aStrStream << "language missing" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- if (!bExtensionMode && hid.empty())
- {
- std::stringstream aStrStream;
- aStrStream << "hid list missing" << std::endl;
- throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
- }
-
link();
}
@@ -1120,7 +1074,7 @@ HelpProcessingErrorInfo& HelpProcessingErrorInfo::operator=( const struct HelpPr
// Returns true in case of success, false in case of error
HELPLINKER_DLLPUBLIC bool compileExtensionHelp
(
- const rtl::OUString& aOfficeHelpPath,
+ const rtl::OUString& aOfficeHelpPath,
const rtl::OUString& aExtensionName,
const rtl::OUString& aExtensionLanguageRoot,
sal_Int32 nXhpFileCount, const rtl::OUString* pXhpFiles,
@@ -1213,6 +1167,4 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp
return bSuccess;
}
-// vnd.sun.star.help://swriter/52821?Language=en-US&System=UNIX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index 2c73d36bd4cf..74d183185cfa 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -52,10 +52,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,20 +64,20 @@ ByteString sOutputFileY;
ByteString sSDFFile;
/*****************************************************************************/
-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 = "";
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++ ) {
@@ -108,15 +108,15 @@ 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() == "-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;
@@ -124,12 +124,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: {
@@ -154,7 +154,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: {
@@ -170,12 +170,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;
}
@@ -227,8 +227,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 );
@@ -260,8 +260,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 03e303e1b8b1..66029f97a691 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -252,7 +252,7 @@ bool HelpParser::CreateSDF(
DirEntry aTempFile( sUsedTempFile );
aTempFile.Kill();
}
- return TRUE;
+ return sal_True;
}
ByteString HelpParser::makeAbsolutePath( const ByteString& sHelpFile , const ByteString& rRoot_in )
@@ -564,9 +564,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 4efcc4c54525..723b54d21e01 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -49,31 +49,31 @@
// 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
ByteString sPrj;
ByteString sPrjRoot;
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;
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++ ) {
@@ -96,11 +96,11 @@ 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 == "-L" ) {
nState = STATE_LANGUAGES;
@@ -108,12 +108,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: {
@@ -130,7 +130,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: {
@@ -143,13 +143,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 5f6273a24ac6..93513e2a8bfe 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -39,7 +39,7 @@ using namespace std;
// class LngParser
//
/*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat )
+LngParser::LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat )
/*****************************************************************************/
:
nError( LNG_OK ),
@@ -101,7 +101,7 @@ void LngParser::FillInFallbacks( ByteStringHashMap Text )
}
/*****************************************************************************/
-BOOL LngParser::CreateSDF(
+sal_Bool LngParser::CreateSDF(
const ByteString &rSDFFile, const ByteString &rPrj,
const ByteString &rRoot )
/*****************************************************************************/
@@ -127,7 +127,7 @@ BOOL LngParser::CreateSDF(
sActFileName.SearchAndReplaceAll( "/", "\\" );
size_t nPos = 0;
- BOOL bStart = true;
+ 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;
@@ -203,7 +203,7 @@ BOOL LngParser::CreateSDF(
}
/*****************************************************************************/
-BOOL LngParser::Merge(
+sal_Bool LngParser::Merge(
const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString& rPrj )
/*****************************************************************************/
{
@@ -217,14 +217,14 @@ BOOL LngParser::Merge(
}
nError = LNG_OK;
- 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();
size_t nPos = 0;
- BOOL bGroup = FALSE;
+ sal_Bool bGroup = sal_False;
ByteString sGroup;
// seek to next group
@@ -238,7 +238,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
}
nPos ++;
}
@@ -246,13 +246,13 @@ BOOL LngParser::Merge(
while ( nPos < pLines->size()) {
ByteStringHashMap Text;
ByteString sID( sGroup );
- ULONG nLastLangPos = 0;
+ sal_uLong 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;
@@ -266,7 +266,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
nPos ++;
sLanguagesDone = "";
}
@@ -290,7 +290,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)[ nPos ];
@@ -323,7 +323,7 @@ BOOL LngParser::Merge(
if( !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 == "-" )))
{
@@ -355,7 +355,7 @@ BOOL LngParser::Merge(
aDestination.WriteLine( *(*pLines)[ i ] );
aDestination.Close();
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 94c06e626e8f..ccf937ef7d98 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -134,7 +134,7 @@ class SourceTreeLocalizer : public SourceTreeIterator
{
private:
SvFileStream aSDF;
- USHORT nMode;
+ sal_uInt16 nMode;
ByteString sLanguageRestriction;
@@ -142,12 +142,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,
@@ -163,8 +163,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
@@ -179,8 +179,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 );
};
@@ -203,10 +203,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();
@@ -234,7 +234,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 );
@@ -247,10 +247,10 @@ const ByteString SourceTreeLocalizer::GetProjectRootRel()
sCur.SearchAndReplaceAll( sDelimiter, "/" );
sCur.EraseLeadingChars( '/' );
- ULONG nCount = sCur.GetTokenCount( '/' );
+ sal_uLong nCount = sCur.GetTokenCount( '/' );
ByteString sProjectRootRel;
- for ( ULONG i = 0; i < nCount; i++ ) {
+ for ( sal_uLong i = 0; i < nCount; i++ ) {
if ( sProjectRootRel.Len())
sProjectRootRel += sDelimiter;
sProjectRootRel += "..";
@@ -366,11 +366,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_uLong nIndex = 0;
+ sal_Bool bReturn = sal_True;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -385,7 +385,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 ];
@@ -395,11 +395,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_uLong nIndex = 0;
+ sal_Bool bReturn = sal_False;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -414,7 +414,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 ];
@@ -439,11 +439,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 );
@@ -460,7 +460,7 @@ void SourceTreeLocalizer::WorkOnDirectory( const ByteString &rDirectory )
/*****************************************************************************/
{
//printf("Working on Directory %s\n",rDirectory.GetBuffer());
- ULONG nIndex = 0;
+ sal_uLong 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 ));
@@ -544,7 +544,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
- ULONG nIndex = 0;
+ sal_uLong nIndex = 0;
ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
ByteString sCandidate( ExeTable[ nIndex ][ 0 ] );
@@ -556,18 +556,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;
}
@@ -606,7 +606,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);
@@ -651,14 +651,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;
@@ -720,18 +720,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;
}
}
}
@@ -750,7 +750,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;
@@ -758,7 +758,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();
}
@@ -814,7 +814,7 @@ int Error()
}
/*****************************************************************************/
-BOOL CheckLanguages( ByteString &rLanguages )
+sal_Bool CheckLanguages( ByteString &rLanguages )
/*****************************************************************************/
{
ByteString sTmp( rLanguages );
@@ -831,17 +831,17 @@ 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 bSkipLinks = false;
ByteString sLanguages;
ByteString sFileName;
ByteString sOutput;
- bExport = TRUE;
+ bExport = sal_True;
for( int i = 1; i < argc; i++ ) {
ByteString sSwitch( argv[ i ] );
@@ -851,7 +851,7 @@ int _cdecl main( int argc, char *argv[] )
nState = STATE_EXPORT;
if ( bMerge )
return Error();
- bExport = TRUE;
+ bExport = sal_True;
}
else if ( sSwitch.Equals( "-I" ) )
nState = STATE_ISOCODE;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e828f12343f8..fa7c914d233e 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -36,27 +36,38 @@
using namespace std;
+namespace
+{
+ static ::rtl::OString lcl_NormalizeFilename(const ::rtl::OString& rFilename)
+ {
+ return rFilename.copy(
+ ::std::max(
+ rFilename.lastIndexOf( "\\" ),
+ rFilename.lastIndexOf( "/" ))+1);
+ };
+}
+
extern void ConvertHalfwitdhToFullwidth( String& rString );
//
// class PFormEntrys
//
-ByteString PFormEntrys::Dump(){
+ByteString PFormEntrys::Dump()
+{
ByteString sRet( "PFormEntrys\n" );
- //sRet.Append( Export::DumpMap( ByteString("sText") , sText ) );
- //sRet.Append("\n");
ByteString a("sText");
- if ( sText.size() ) Export::DumpMap( a , sText );
+ if(sText.size())
+ Export::DumpMap(a , sText);
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 ) == '\\' )
{
@@ -68,31 +79,18 @@ 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 )
{
- /*printf("DBG: PFormEntrys::GetText(nId=%s)\n",nLangIndex.GetBuffer() );
-
- // DEBUG******************
- ByteStringHashMap::const_iterator idbg;
- std::cout << "HASHKEYS : \n";
- for( idbg = sText.begin() ; idbg != sText.end(); ++idbg )
- std::cout << (idbg->first).GetBuffer() << "\n";
- std::cout << "\n\n";
- std::cout << "String sText[ nLangIndex ] = " << sText[ nLangIndex ].GetBuffer() << "\n";
- // 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;
@@ -102,17 +100,16 @@ 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());
return bReturn;
}
@@ -121,68 +118,53 @@ BOOL PFormEntrys::GetText( ByteString &rReturn,
// class MergeData
//
-/*****************************************************************************/
MergeData::~MergeData()
-/*****************************************************************************/
{
}
-/*****************************************************************************/
-PFormEntrys* MergeData::GetPFormEntrys( ResData *pResData )
-/*****************************************************************************/
+PFormEntrys* MergeData::GetPFormEntrys(ResData*)
{
-
- (void) pResData; // FIXME
- if( aMap.find( ByteString("HACK") ) != aMap.end() ){
- return aMap[ ByteString("HACK") ];
- }
- else{
- return 0;
- }
+ if( aMap.find( ByteString("HACK") ) != aMap.end() )
+ return aMap[ ByteString("HACK") ];
+ return NULL;
}
-void MergeData::Insert( const ByteString& rPFO , PFormEntrys* pfEntrys ){
- (void) rPFO; // FIXME
+void MergeData::Insert(const ByteString&, PFormEntrys* pfEntrys )
+{
aMap.insert( PFormEntrysHashMap::value_type( ByteString("HACK") , pfEntrys ) );
-
}
+
ByteString MergeData::Dump(){
ByteString sRet( "MergeData\n" );
printf("MergeData sTyp = %s , sGid = %s , sLid =%s , sFilename = %s\n",sTyp.GetBuffer(),sGID.GetBuffer(),sLID.GetBuffer(), sFilename.GetBuffer() );
PFormEntrysHashMap::const_iterator idbg;
- for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ){
+ for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg )
+ {
printf("aMap[ %s ] = " ,idbg->first.GetBuffer());
( (PFormEntrys*)(idbg->second) )->Dump();
- printf("\n") ;
+ printf("\n");
}
- printf("\n") ;
+ printf("\n");
return sRet;
}
PFormEntrys* MergeData::GetPFObject( const ByteString& rPFO ){
- if( aMap.find( ByteString("HACK") ) != aMap.end() ){
+ if( aMap.find( ByteString("HACK") ) != aMap.end() )
return aMap[ rPFO ];
- }
- else{
- return 0;
- }
+ return NULL;
}
-/*****************************************************************************/
PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm )
-/*****************************************************************************/
{
PFormEntrys* pFEntrys = new PFormEntrys( rPForm );
aMap.insert( PFormEntrysHashMap::value_type( rPForm , pFEntrys ) );
return pFEntrys;
}
-/*****************************************************************************/
-BOOL MergeData::operator==( ResData *pData )
-/*****************************************************************************/
+sal_Bool MergeData::operator==( ResData *pData )
{
ByteString sResTyp_upper( pData->sResTyp );
sResTyp_upper.ToUpperAscii();
@@ -203,121 +185,95 @@ BOOL MergeData::operator==( ResData *pData )
#define FFORMAT_NEW 0x0001
#define FFORMAT_OLD 0x0002
-/*****************************************************************************/
-MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFile ,BOOL bErrLog,
- CharSet aCharSet, bool bCaseSensitive )
-/*****************************************************************************/
- : bErrorLog( bErrLog )
+MergeDataFile::MergeDataFile(
+ const ByteString &rFileName,
+ const ByteString& sFile,
+ sal_Bool bErrLog,
+ CharSet aCharSet,
+ bool bCaseSensitive)
+ : bErrorLog( bErrLog )
{
-
SvFileStream aInputStream( String( rFileName, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_READ );
aInputStream.SetStreamCharSet( aCharSet );
ByteString sLine;
-// printf("\nReading localize.sdf ...\n");
- ByteString sTYP;
- ByteString sGID;
- ByteString sLID;
- ByteString sPFO;
- ByteString nLANG;
- ByteString sTEXT;
- ByteString sQHTEXT;
- ByteString sTITLE;
- ByteString sHACK("HACK");
+ const ByteString sHACK("HACK");
+ const ::rtl::OString sFileNormalized(lcl_NormalizeFilename(sFile));
+ const bool isFileEmpty = sFileNormalized.getLength();
- const ByteString sEmpty("");
-
- if( !aInputStream.IsOpen() ) {
+ if( !aInputStream.IsOpen() )
+ {
printf("Warning : Can't open %s\n", rFileName.GetBuffer());
return;
}
- while ( !aInputStream.IsEof()) {
+ while ( !aInputStream.IsEof())
+ {
xub_StrLen nToks;
aInputStream.ReadLine( sLine );
sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, aCharSet );
nToks = sLine.GetTokenCount( '\t' );
- if ( nToks == 15 ) {
+ if ( nToks == 15 )
+ {
// Skip all wrong filenames
- ByteString filename = sLine.GetToken( 1 , '\t' );
- filename = filename.Copy( filename.SearchCharBackward( "\\" )+1 , filename.Len() );
-
- if( sFile.Equals( sEmpty ) || ( !sFile.Equals( sEmpty ) && filename.Equals( sFile ) ) )
+ const ::rtl::OString filename = lcl_NormalizeFilename(sLine.GetToken( 1 , '\t' ));
+ if(isFileEmpty || sFileNormalized.equals("") || (!isFileEmpty && filename.equals(sFileNormalized)) )
{
- xub_StrLen rIdx = 0;
- sTYP = sLine.GetToken( 3, '\t', rIdx );
- sGID = sLine.GetToken( 0, '\t', rIdx ); // 4
- sLID = sLine.GetToken( 0, '\t', rIdx ); // 5
- sPFO = sLine.GetToken( 1, '\t', rIdx ); // 7
- sPFO = sHACK;
- nLANG = sLine.GetToken( 1, '\t', rIdx ); // 9
- sTEXT = sLine.GetToken( 0, '\t', rIdx ); // 10
-
- sQHTEXT = sLine.GetToken( 1, '\t', rIdx ); // 12
- sTITLE = sLine.GetToken( 0, '\t', rIdx ); // 13
-
+ xub_StrLen rIdx = 0;
+ const ByteString sTYP = sLine.GetToken( 3, '\t', rIdx );
+ const ByteString sGID = sLine.GetToken( 0, '\t', rIdx ); // 4
+ const ByteString sLID = sLine.GetToken( 0, '\t', rIdx ); // 5
+ ByteString sPFO = sLine.GetToken( 1, '\t', rIdx ); // 7
+ sPFO = sHACK;
+ ByteString nLANG = sLine.GetToken( 1, '\t', rIdx ); // 9
nLANG.EraseLeadingAndTrailingChars();
+ const ByteString sTEXT = sLine.GetToken( 0, '\t', rIdx ); // 10
+ const ByteString sQHTEXT = sLine.GetToken( 1, '\t', rIdx ); // 12
+ const ByteString sTITLE = sLine.GetToken( 0, '\t', rIdx ); // 13
+
#ifdef MERGE_SOURCE_LANGUAGES
- if( true ){
+ if( true )
#else
- if ( !nLANG.EqualsIgnoreCaseAscii("en-US") ){
+ if( !nLANG.EqualsIgnoreCaseAscii("en-US") )
#endif
- ByteStringHashMap::const_iterator lit;
- lit = aLanguageMap.find (nLANG);
- ByteString aLANG;
- if (lit == aLanguageMap.end()) {
- aLANG = nLANG;
- aLanguageMap.insert( ByteStringHashMap::value_type( aLANG, aLANG ) );
- // Remember read languages for -l all switch
- aLanguageList.push_back( nLANG );
- } else
- aLANG = lit->first;
-
- InsertEntry( sTYP, sGID, sLID, sPFO, aLANG, sTEXT, sQHTEXT, sTITLE , filename , bCaseSensitive );
+ {
+ aLanguageSet.insert(nLANG);
+ InsertEntry( sTYP, sGID, sLID, sPFO, nLANG, sTEXT, sQHTEXT, sTITLE, filename, bCaseSensitive );
}
}
}
- else if ( nToks == 10 ) {
+ else if ( nToks == 10 )
+ {
printf("ERROR: File format is obsolete and no longer supported!\n");
}
}
aInputStream.Close();
}
-/*****************************************************************************/
+
MergeDataFile::~MergeDataFile()
-/*****************************************************************************/
{
}
ByteString MergeDataFile::Dump(){
ByteString sRet( "MergeDataFile\n" );
- //sRet.Append( Export::DumpMap( "aLanguageSet" , aLanguageSet ) );
- //sRet.Append( Export::DumpMap( "aLanguageList" , aLanguageList ) );
printf("MergeDataFile\n");
MergeDataHashMap::const_iterator idbg;
- for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ){
- /*sRet.Append( "aMap[" );
- sRet.Append( idbg->first );
- sRet.Append( "]= " );
- sRet.Append( ((MergeData*) (idbg->second))->Dump() );
- sRet.Append("\n");*/
-
+ for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg )
+ {
printf("aMap[ %s ] = ",idbg->first.GetBuffer());
((MergeData*) (idbg->second))->Dump();
printf("\n");
}
printf("\n");
- //sRet.Append("\n");
return sRet;
}
-/*****************************************************************************/
void MergeDataFile::WriteError( const ByteString &rLine )
-/*****************************************************************************/
{
- if ( bErrorLog ) {
+ if ( bErrorLog )
+ {
if ( !aErrLog.IsOpen())
aErrLog.Open( String( sErrorLog, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_WRITE | STREAM_TRUNC );
aErrLog.WriteLine( rLine );
@@ -325,44 +281,39 @@ void MergeDataFile::WriteError( const ByteString &rLine )
else
fprintf( stderr, "%s\n", rLine.GetBuffer());
}
+
std::vector<ByteString> MergeDataFile::GetLanguages(){
- return aLanguageList;
+ return std::vector<ByteString>(aLanguageSet.begin(),aLanguageSet.end());
}
-/*****************************************************************************/
MergeData *MergeDataFile::GetMergeData( ResData *pResData , bool bCaseSensitive )
-/*****************************************************************************/
{
ByteString sOldG = pResData->sGId;
ByteString sOldL = pResData->sId;
ByteString sGID = pResData->sGId;
ByteString sLID;
- if ( !sGID.Len())
+ if(!sGID.Len())
sGID = pResData->sId;
else
sLID = pResData->sId;
pResData->sGId = sGID;
pResData->sId = sLID;
- //printf("MergeData:: Search gid=%s lid=%s filename=%s \n", pResData->sGId.GetBuffer(),pResData->sId.GetBuffer(),pResData->sFilename.GetBuffer() );
+
ByteString sKey = CreateKey( pResData->sResTyp , pResData->sGId , pResData->sId , pResData->sFilename , bCaseSensitive );
- //printf("DBG: Searching [%s]\n",sKey.GetBuffer());
- if( aMap.find( sKey ) != aMap.end() ){
+ if(aMap.find( sKey ) != aMap.end())
+ {
pResData->sGId = sOldG;
pResData->sId = sOldL;
- //printf("DBG: Found[%s]\n",sKey.GetBuffer());
return aMap[ sKey ];
}
pResData->sGId = sOldG;
pResData->sId = sOldL;
- //printf("DBG: Found[%s]\n",sKey.GetBuffer());
return NULL;
}
-/*****************************************************************************/
PFormEntrys *MergeDataFile::GetPFormEntrys( ResData *pResData )
-/*****************************************************************************/
{
// search for requested PFormEntrys
MergeData *pData = GetMergeData( pResData );
@@ -371,9 +322,7 @@ PFormEntrys *MergeDataFile::GetPFormEntrys( ResData *pResData )
return NULL;
}
-/*****************************************************************************/
PFormEntrys *MergeDataFile::GetPFormEntrysCaseSensitive( ResData *pResData )
-/*****************************************************************************/
{
// search for requested PFormEntrys
MergeData *pData = GetMergeData( pResData , true );
@@ -381,69 +330,60 @@ PFormEntrys *MergeDataFile::GetPFormEntrysCaseSensitive( ResData *pResData )
return pData->GetPFormEntrys( pResData );
return NULL;
}
-/*****************************************************************************/
+
void MergeDataFile::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 &rInFilename , bool bCaseSensitive
- )
-/*****************************************************************************/
+ 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 &rInFilename , bool bCaseSensitive
+ )
{
MergeData *pData;
- // uniquify the filename to save memory.
- ByteStringHashMap::const_iterator fit = aFilenames.find (rInFilename);
- ByteString aFilename;
- if (fit == aFilenames.end()) {
- aFilename = rInFilename;
- aFilenames.insert (ByteStringHashMap::value_type (aFilename, aFilename));
- } else
- aFilename = fit->first;
-
// search for MergeData
-
- ByteString sKey = CreateKey( rTYP , rGID , rLID , aFilename , bCaseSensitive );
+ ByteString sKey = CreateKey( rTYP , rGID , rLID , rInFilename , bCaseSensitive );
MergeDataHashMap::const_iterator mit;
mit = aMap.find( sKey );
- if( mit != aMap.end() ){
+ if( mit != aMap.end() )
+ {
pData = mit->second;
- }else{
- pData = new MergeData( rTYP, rGID, rLID, aFilename );
+ }
+ else
+ {
+ pData = new MergeData( rTYP, rGID, rLID, rInFilename );
aMap.insert( MergeDataHashMap::value_type( sKey, pData ) );
}
PFormEntrys *pFEntrys = 0;
// search for PFormEntrys
-
pFEntrys = pData->GetPFObject( rPFO );
- if( !pFEntrys ){
+ if( !pFEntrys )
+ {
// create new PFormEntrys, cause no one exists with current properties
pFEntrys = new PFormEntrys( rPFO );
pData->Insert( rPFO , pFEntrys );
}
// finaly insert the cur string
-
pFEntrys->InsertEntry( nLANG , rTEXT, rQHTEXT, rTITLE );
-
- //printf("DBG: MergeDataFile::Insert[]=( sKey=%s,nLang=%s,rTEXT=%s)\n",sKey2.GetBuffer(),nLANG.GetBuffer(),rTEXT.GetBuffer());
-}
-ByteString MergeDataFile::CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive ){
-
- ByteString sKey( rTYP );
- sKey.Append( '-' );
- sKey.Append( rGID );
- sKey.Append( '-' );
- sKey.Append( rLID );
- sKey.Append( '-' );
- sKey.Append( rFilename );
-
- if( bCaseSensitive ) return sKey; // officecfg case sensitive identifier
- else return sKey.ToUpperAscii();
}
+ByteString MergeDataFile::CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive )
+{
+ static const ::rtl::OString sStroke('-');
+ ::rtl::OString sKey( rTYP );
+ sKey += sStroke;
+ sKey += rGID;
+ sKey += sStroke;
+ sKey += rLID;
+ sKey += sStroke;
+ sKey += lcl_NormalizeFilename(rFilename);
+ OSL_TRACE("created key: %s", sKey.getStr());
+ if(bCaseSensitive)
+ return sKey; // officecfg case sensitive identifier
+ return sKey.toAsciiUpperCase();
+}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/l10ntools/source/srciter.cxx b/l10ntools/source/srciter.cxx
index eb5d78f775af..fa29217017d9 100644
--- a/l10ntools/source/srciter.cxx
+++ b/l10ntools/source/srciter.cxx
@@ -41,7 +41,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 ;
@@ -104,31 +104,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_uLong 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 30cbdd190291..65bd70a32ef4 100644
--- a/l10ntools/source/tagtest.cxx
+++ b/l10ntools/source/tagtest.cxx
@@ -43,12 +43,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)
@@ -91,14 +91,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;
@@ -127,7 +127,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_TAG_NAME;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '/':
{
@@ -138,12 +138,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;
}
@@ -157,16 +157,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;
}
@@ -177,7 +177,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;
}
@@ -189,10 +189,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;
@@ -204,7 +204,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;
@@ -225,14 +225,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;
@@ -252,13 +252,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;
}
@@ -270,11 +270,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;
}
@@ -285,7 +285,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -294,16 +294,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;
}
@@ -314,7 +314,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -322,7 +322,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
default: rErrorList.AddError( 99, "Internal error Parsing Tag ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
@@ -331,14 +331,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++ )
{
@@ -354,11 +354,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 )
@@ -366,9 +366,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;
}
@@ -384,23 +384,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" ) )
@@ -416,26 +416,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" ))
@@ -444,25 +444,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 )
@@ -486,7 +486,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;
}
}
}
@@ -497,7 +497,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;
}
}
}
@@ -509,7 +509,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;
}
}
}
@@ -517,7 +517,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
@@ -549,22 +549,22 @@ 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 )
{
maList.push_back( new ParserError( nErrorNr, aErrorText, rTag ) );
}
-void ParserMessageList::AddWarning( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
+void ParserMessageList::AddWarning( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
{
maList.push_back( new ParserWarning( nErrorNr, aErrorText, rTag ) );
}
-BOOL ParserMessageList::HasErrors()
+sal_Bool ParserMessageList::HasErrors()
{
for ( size_t i = 0, n = maList.size(); i < n; ++i )
if ( maList[ i ]->IsError() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
void ParserMessageList::clear()
@@ -676,7 +676,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;
@@ -693,9 +693,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 )
@@ -714,7 +714,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++;
@@ -732,7 +732,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++;
@@ -746,11 +746,11 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
return aResult;
}
-String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &rTagStartPos )
+String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, sal_uInt16 &rTagStartPos )
{
- 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 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;
@@ -765,7 +765,7 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
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;
@@ -777,8 +777,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);
@@ -805,7 +805,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++;
@@ -830,8 +830,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;
@@ -961,11 +961,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();
}
}
@@ -983,11 +983,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();
}
}
@@ -1295,12 +1295,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 )
@@ -1310,7 +1310,7 @@ BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpec
|| aCurrentToken.nId != TAG_COMMONEND )
{
aTag = aParser.GetNextToken( *pErrorList );
- return TRUE;
+ return sal_True;
}
}
@@ -1331,10 +1331,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);
@@ -1343,7 +1343,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 )
@@ -1363,15 +1363,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 );
@@ -1388,7 +1388,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 )
@@ -1400,10 +1400,10 @@ 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 )
{
size_t i=0,j=0;
// Clean old Warnings
@@ -1438,39 +1438,39 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
if ( aReference[ i ].IsDone() )
continue;
- BOOL bTagFound = FALSE;
+ sal_Bool bTagFound = sal_False;
for ( j=0 ; j < aTestee.size() && !bTagFound ; j++ )
{
if ( aTestee[ j ].IsDone() )
continue;
- if ( aReference[ i ].MatchesTranslation( aTestee[ j ], FALSE, aCompareWarningList ) )
+ if ( aReference[ i ].MatchesTranslation( aTestee[ j ], sal_False, aCompareWarningList ) )
{
aReference[ i ].SetDone();
aTestee[ 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.size() ; i++ )
if ( !aReference[ i ].IsDone() )
nTagCount++;
if ( nTagCount > 1 )
- bCanFix = FALSE;
+ bCanFix = sal_False;
nTagCount = 0;
for ( i=0 ; i < aTestee.size() ; i++ )
if ( !aTestee[ i ].IsDone() )
nTagCount++;
if ( nTagCount > 1 )
- bCanFix = FALSE;
+ bCanFix = sal_False;
}
// generate errors for tags that have differing attributes
@@ -1479,17 +1479,17 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
if ( aReference[ i ].IsDone() )
continue;
- BOOL bTagFound = FALSE;
+ sal_Bool bTagFound = sal_False;
for ( j=0 ; j < aTestee.size() && !bTagFound ; j++ )
{
if ( aTestee[ j ].IsDone() )
continue;
- if ( aReference[ i ].MatchesTranslation( aTestee[ j ], TRUE, aCompareWarningList, bCanFix && bFixTags ) )
+ if ( aReference[ i ].MatchesTranslation( aTestee[ j ], sal_True, aCompareWarningList, bCanFix && bFixTags ) )
{
aReference[ i ].SetDone();
aTestee[ j ].SetDone();
- bTagFound = TRUE;
+ bTagFound = sal_True;
}
}
}
@@ -1511,10 +1511,10 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
}
for ( i=0 ; i < aReference.size() ; i++ )
- aReference[ i ].SetDone( FALSE );
+ aReference[ i ].SetDone( sal_False );
for ( i=0 ; i < aTestee.size() ; i++ )
- aTestee[ i ].SetDone( FALSE );
+ aTestee[ i ].SetDone( sal_False );
}
void LingTest::CheckReference( GSILine *aReference )
@@ -1522,7 +1522,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() );
@@ -1533,14 +1533,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.size() ; i > 0 ; )
{
if ( aTesteeTokens[ --i ].HasBeenFixed() )
{
- bFixesDone = TRUE;
+ bFixesDone = sal_True;
aFixedTestee.Replace( aTesteeTokens[ i ].nPos, aTesteeTokens[ i ].aTokenString.Len(), aTesteeTokens[ i ].MakeTag() );
}
}
diff --git a/l10ntools/source/wtranode.cxx b/l10ntools/source/wtranode.cxx
index 1a4e48fd6231..5ddbe0f0cd46 100644
--- a/l10ntools/source/wtranode.cxx
+++ b/l10ntools/source/wtranode.cxx
@@ -80,11 +80,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 26838e2fb29d..7e3bf4fda724 100644
--- a/l10ntools/source/wtratree.cxx
+++ b/l10ntools/source/wtratree.cxx
@@ -256,10 +256,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.
@@ -331,11 +331,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)
@@ -366,7 +366,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 9e1b46d75cbb..211ea3cad402 100644
--- a/l10ntools/source/xgfconv.cxx
+++ b/l10ntools/source/xgfconv.cxx
@@ -37,14 +37,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 );
@@ -56,7 +56,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 bb921b4a7fc5..b6a539a5db1e 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -248,14 +248,14 @@ XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
if ( !pList )
return ( XMLElement * ) pChild;
- BOOL bMatch = FALSE;
+ sal_Bool bMatch = sal_False;
for ( size_t j = 0; j < pList->size() && bMatch; j++ ) {
XMLAttribute *pAttribute = (*pList)[ j ];
XMLAttribute *pCandidate =
(( XMLElement * ) pChild )->GetAttribute(
*pAttribute );
if ( !pCandidate || !pAttribute->IsEqual( *pCandidate ))
- bMatch = FALSE;
+ bMatch = sal_False;
}
if ( bMatch )
return ( XMLElement * ) pChild;
@@ -269,14 +269,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 )
/*****************************************************************************/
{
@@ -331,7 +331,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;
@@ -395,11 +395,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 )
@@ -477,13 +477,13 @@ XMLFile::XMLFile( const String &rFileName ) // the file name, empty if created f
XMLStrings ( NULL )
{
- 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"),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 )
@@ -750,7 +750,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
}
/*****************************************************************************/
-USHORT XMLElement::GetNodeType()
+sal_uInt16 XMLElement::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_ELEMENT;
@@ -1012,7 +1012,7 @@ void XMLData::AddData( const String &rData) {
}
/*****************************************************************************/
-USHORT XMLData::GetNodeType()
+sal_uInt16 XMLData::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_DATA;
@@ -1023,7 +1023,7 @@ USHORT XMLData::GetNodeType()
//
/*****************************************************************************/
-USHORT XMLComment::GetNodeType()
+sal_uInt16 XMLComment::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_COMMENT;
@@ -1049,7 +1049,7 @@ XMLComment& XMLComment::operator=(const XMLComment& obj){
//
/*****************************************************************************/
-USHORT XMLDefault::GetNodeType()
+sal_uInt16 XMLDefault::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_DEFAULT;
@@ -1247,7 +1247,7 @@ XMLFile *SimpleXMLParser::Execute( SvMemoryStream *pStream )
pCurNode = pXMLFile;
pCurData = NULL;
- ULONG nPos = pStream->Tell();
+ sal_uLong nPos = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_END );
aErrorInformation.eCode = XML_ERROR_NONE;
@@ -1262,7 +1262,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 );
@@ -1332,7 +1332,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 513d0f088874..69cc32c52306 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -58,10 +58,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;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sInputFileName;
@@ -78,17 +78,17 @@ 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 = "";
- 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,15 +109,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;
@@ -132,7 +132,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: {
@@ -149,7 +149,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: {
@@ -162,7 +162,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;
@@ -290,8 +290,8 @@ int GetError()
/*****************************************************************************/
XRMResParser::XRMResParser()
/*****************************************************************************/
- : bError( FALSE ),
- bText( FALSE )
+ : bError( sal_False ),
+ bText( sal_False )
{
aLanguages = Export::GetLanguages();
}
@@ -341,7 +341,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, '.' );
@@ -357,7 +357,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
//EndOfText( sCurrentOpenTag, sCurrentCloseTag );
sLID = sNewLID;
}
- bText = TRUE;
+ bText = sal_True;
sCurrentText = "";
sCurrentOpenTag = rToken;
Output( rToken );
@@ -372,7 +372,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
WorkOnText( sCurrentOpenTag, sCurrentText );
Output( sCurrentText );
EndOfText( sCurrentOpenTag, sCurrentCloseTag );// <---
- bText = FALSE;
+ bText = sal_False;
rToken = ByteString("");
sCurrentText = ByteString("");
//printf("<-XRM_TEXT_END");
@@ -412,7 +412,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 );
@@ -682,7 +682,7 @@ void XRMResMerge::EndOfText(
ByteString sContent;
if ( !sCur.EqualsIgnoreCaseAscii("en-US") &&
( pEntrys->GetText(
- sContent, STRING_TYP_TEXT, sCur, TRUE )) &&
+ sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
( sContent != "-" ) && ( sContent.Len()))
{
ByteString sText( sContent );
@@ -700,7 +700,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 );