diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-02 09:11:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-02 09:22:07 +0100 |
commit | e521a240601c6a2b9f9448db73c09181fed2247d (patch) | |
tree | a878cdcf1b551491edc64551c2fd24888906b123 /l10ntools/inc | |
parent | missing semicolon (diff) | |
download | core-e521a240601c6a2b9f9448db73c09181fed2247d.tar.gz core-e521a240601c6a2b9f9448db73c09181fed2247d.zip |
Reduced tools/string usage
plus some preliminary cfgex clean up.
Diffstat (limited to 'l10ntools/inc')
-rw-r--r-- | l10ntools/inc/cfgmerge.hxx | 29 | ||||
-rw-r--r-- | l10ntools/inc/export.hxx | 79 | ||||
-rw-r--r-- | l10ntools/inc/gsicheck.hxx | 47 | ||||
-rw-r--r-- | l10ntools/inc/helpmerge.hxx | 20 | ||||
-rw-r--r-- | l10ntools/inc/lngmerge.hxx | 4 | ||||
-rw-r--r-- | l10ntools/inc/xmlparse.hxx | 53 |
6 files changed, 115 insertions, 117 deletions
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx index d85271536660..bd0627e876f0 100644 --- a/l10ntools/inc/cfgmerge.hxx +++ b/l10ntools/inc/cfgmerge.hxx @@ -29,11 +29,10 @@ #ifndef _CFG_MERGE_HXX #define _CFG_MERGE_HXX -#include <tools/string.hxx> #include <boost/unordered_map.hpp> #include <vector> -typedef boost::unordered_map<rtl::OString, rtl::OString, rtl::OStringHash> ByteStringHashMap; +typedef boost::unordered_map<rtl::OString, rtl::OString, rtl::OStringHash> OStringHashMap; // @@ -54,7 +53,7 @@ private: rtl::OString sTextTag; rtl::OString sEndTextTag; - ByteStringHashMap sText; + OStringHashMap sText; public: CfgStackData(const rtl::OString &rTag, const rtl::OString &rId) : sTagType( rTag ), sIdentifier( rId ) @@ -106,7 +105,7 @@ class CfgParser protected: rtl::OString sCurrentResTyp; rtl::OString sCurrentIsoLang; - ByteString sCurrentText; + rtl::OString sCurrentText; rtl::OString sLastWhitespace; @@ -116,7 +115,7 @@ protected: sal_Bool bLocalize; virtual void WorkOnText( - ByteString &rText, + rtl::OString &rText, const rtl::OString &rLangIndex )=0; virtual void WorkOnRessourceEnd()=0; @@ -129,9 +128,9 @@ private: int ExecuteAnalyzedToken( int nToken, char *pToken ); std::vector<rtl::OString> aLanguages; void AddText( - ByteString &rText, - const ByteString &rIsoLang, - const ByteString &rResTyp ); + rtl::OString &rText, + const rtl::OString &rIsoLang, + const rtl::OString &rResTyp ); sal_Bool IsTokenClosed(const rtl::OString &rToken); @@ -162,12 +161,12 @@ public: class CfgExport : public CfgOutputParser { private: - ByteString sPrj; - ByteString sPath; + rtl::OString sPrj; + rtl::OString sPath; std::vector<rtl::OString> aLanguages; protected: virtual void WorkOnText( - ByteString &rText, + rtl::OString &rText, const rtl::OString &rIsoLang ); @@ -175,9 +174,9 @@ protected: void Output(const rtl::OString& rOutput); public: CfgExport( - const ByteString &rOutputFile, - const ByteString &rProject, - const ByteString &rFilePath + const rtl::OString &rOutputFile, + const rtl::OString &rProject, + const rtl::OString &rFilePath ); ~CfgExport(); }; @@ -197,7 +196,7 @@ private: sal_Bool bEnglish; protected: - virtual void WorkOnText(ByteString &rText, const rtl::OString &rLangIndex); + virtual void WorkOnText(rtl::OString &rText, const rtl::OString &rLangIndex); void WorkOnRessourceEnd(); diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index e0fcf058fe1e..d8e3c963aa3e 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -29,6 +29,8 @@ #ifndef _EXPORT_HXX #define _EXPORT_HXX +#include "sal/config.h" + #include <comphelper/string.hxx> #ifndef L10NTOOLS_DIRECTORY_HXX @@ -36,7 +38,6 @@ #include <l10ntools/directory.hxx> #endif -#include <tools/string.hxx> #include <tools/stream.hxx> #include <tools/fsys.hxx> #include <osl/file.hxx> @@ -58,13 +59,12 @@ class PFormEntrys; class MergeData; -typedef std::set<rtl::OString> ByteStringSet; typedef boost::unordered_map<rtl::OString, rtl::OString, rtl::OStringHash> - ByteStringHashMap; + OStringHashMap; typedef boost::unordered_map<rtl::OString, bool, rtl::OStringHash> - ByteStringBoolHashMap; + OStringBoolHashMap; typedef boost::unordered_map<rtl::OString, PFormEntrys*, rtl::OStringHash> PFormEntrysHashMap; @@ -75,7 +75,7 @@ typedef boost::unordered_map<rtl::OString, MergeData*, rtl::OStringHash> #define SOURCE_LANGUAGE rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US")) #define LIST_REFID "LIST_REFID" -typedef ByteStringHashMap ExportListEntry; +typedef OStringHashMap ExportListEntry; typedef ::std::vector< ExportListEntry* > ExportListBase; // @@ -145,16 +145,16 @@ public: rtl::OString sHelpId; rtl::OString sFilename; - ByteStringHashMap sText; + OStringHashMap sText; sal_uInt16 nTextRefId; - ByteStringHashMap sHelpText; + OStringHashMap sHelpText; sal_uInt16 nHelpTextRefId; - ByteStringHashMap sQuickHelpText; + OStringHashMap sQuickHelpText; sal_uInt16 nQuickHelpTextRefId; - ByteStringHashMap sTitle; + OStringHashMap sTitle; sal_uInt16 nTitleRefId; rtl::OString sTextTyp; @@ -267,7 +267,7 @@ private: ResStack aResStack; // stack for parsing recursive - ByteString sActPForm; // hold cur. system + rtl::OString sActPForm; // hold cur. system sal_Bool bDefine; // cur. res. in a define? sal_Bool bNextMustBeDefineEOL; // define but no \ at lineend @@ -277,18 +277,18 @@ private: sal_uLong nListIndex; sal_uLong nListLevel; bool bSkipFile; - ByteString sProject; - ByteString sRoot; + rtl::OString sProject; + rtl::OString sRoot; sal_Bool bEnableExport; sal_Bool bMergeMode; - ByteString sMergeSrc; - ByteString sLastListLine; + rtl::OString sMergeSrc; + rtl::OString sLastListLine; sal_Bool bError; // any errors while export? sal_Bool bReadOver; sal_Bool bDontWriteOutput; - ByteString sLastTextTyp; + rtl::OString sLastTextTyp; static bool isInitialized; - ByteString sFilename; + rtl::OString sFilename; public: @@ -296,8 +296,6 @@ public: static rtl::OString sLanguages; // public ? static rtl::OString sForcedLanguages; // public ? - - static bool skipProject( ByteString sPrj ) ; static void InitLanguages( bool bMergeMode = false ); static void InitForcedLanguages( bool bMergeMode = false ); static std::vector<rtl::OString> GetLanguages(); @@ -308,10 +306,10 @@ public: static bool hasUTF8ByteOrderMarker( const rtl::OString &rString ); static void RemoveUTF8ByteOrderMarkerFromFile(const rtl::OString &rFilename); static bool fileHasUTF8ByteOrderMarker(const rtl::OString &rString); - static void QuotHTML( ByteString &rString ); + static rtl::OString QuoteHTML( rtl::OString const &rString ); static bool CopyFile(const rtl::OString& rSource , const rtl::OString& rDest); - static void UnquotHTML( ByteString &rString ); + static rtl::OString UnquoteHTML( rtl::OString const &rString ); static const char* GetEnv( const char *pVar ); @@ -323,14 +321,14 @@ public: static void getCurrentDir( std::string& dir ); static rtl::OString GetTimeStamp(); - static sal_Bool ConvertLineEnds( ByteString sSource, ByteString sDestination ); - static ByteString GetNativeFile( ByteString sSource ); + static sal_Bool ConvertLineEnds( rtl::OString const & sSource, rtl::OString const & sDestination ); + static rtl::OString GetNativeFile( rtl::OString const & sSource ); static DirEntry GetTempFile(); static void DumpExportList(const rtl::OString& rListName, ExportList& aList); static void DumpMap(const rtl::OString& rMapName, - ByteStringHashMap& aMap); + OStringHashMap& aMap); private: static std::vector<rtl::OString> aLanguages; @@ -340,7 +338,7 @@ private: sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList, const rtl::OString &rTyp, sal_Bool bCreateNew = sal_False ); - ByteString MergePairedList( ByteString& sLine , ByteString& sText ); + rtl::OString MergePairedList( rtl::OString const & sLine , rtl::OString const & sText ); rtl::OString FullId(); // creates cur. GID @@ -349,19 +347,19 @@ private: rtl::OString StripList(const rtl::OString& rText); void InsertListEntry(const rtl::OString &rText, const rtl::OString &rLine); - void CleanValue( ByteString &rValue ); + void CleanValue( rtl::OString &rValue ); rtl::OString GetText(const rtl::OString &rSource, int nToken); - sal_Bool PrepareTextToMerge(ByteString &rText, sal_uInt16 nTyp, + sal_Bool PrepareTextToMerge(rtl::OString &rText, sal_uInt16 nTyp, rtl::OString &rLangIndex, ResData *pResData); void MergeRest( ResData *pResData, sal_uInt16 nMode = MERGE_MODE_NORMAL ); - void ConvertMergeContent( ByteString &rText ); + void ConvertMergeContent( rtl::OString &rText ); void WriteToMerged(const rtl::OString &rText , bool bSDFContent); void SetChildWithText(); - void CutComment( ByteString &rText ); + void CutComment( rtl::OString &rText ); public: Export(const rtl::OString &rOutput, sal_Bool bWrite, @@ -386,20 +384,21 @@ public: * Purpose: holds information of data to merge (one pform) ******************************************************************************/ -class PFormEntrys : public ByteString +class PFormEntrys { friend class MergeDataFile; private: - ByteString sHelpText; // empty string - ByteStringHashMap sText; - ByteStringBoolHashMap bTextFirst; - ByteStringHashMap sQuickHelpText; - ByteStringBoolHashMap bQuickHelpTextFirst; - ByteStringHashMap sTitle; - ByteStringBoolHashMap bTitleFirst; + rtl::OString data_; //TODO + rtl::OString sHelpText; // empty string + OStringHashMap sText; + OStringBoolHashMap bTextFirst; + OStringHashMap sQuickHelpText; + OStringBoolHashMap bQuickHelpTextFirst; + OStringHashMap sTitle; + OStringBoolHashMap bTitleFirst; public: - PFormEntrys( const ByteString &rPForm ) : ByteString( rPForm ) {}; + PFormEntrys( const rtl::OString &rPForm ) : data_( rPForm ) {}; rtl::OString Dump(); void InsertEntry(const rtl::OString &rId, const rtl::OString &rText, const rtl::OString &rQuickHelpText, const rtl::OString &rTitle) @@ -412,8 +411,8 @@ public: sTitle[ rId ] = rTitle; bTitleFirst[ rId ] = true; } - 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 ); + sal_Bool GetText( rtl::OString &rReturn, sal_uInt16 nTyp, const rtl::OString &nLangIndex, sal_Bool bDel = sal_False ); + sal_Bool GetTransex3Text( rtl::OString &rReturn, sal_uInt16 nTyp, const rtl::OString &nLangIndex, sal_Bool bDel = sal_False ); }; @@ -461,7 +460,7 @@ class MergeDataFile { private: sal_Bool bErrorLog; - ByteString sErrorLog; + rtl::OString sErrorLog; SvFileStream aErrLog; MergeDataHashMap aMap; std::set<rtl::OString> aLanguageSet; diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx index 2915c693ddad..3a6fc547d670 100644 --- a/l10ntools/inc/gsicheck.hxx +++ b/l10ntools/inc/gsicheck.hxx @@ -37,20 +37,19 @@ // enum LineFormat { FORMAT_SDF, FORMAT_UNKNOWN }; -class GSILine : public ByteString +class GSILine { private: - ParserMessageList aMessages; LineFormat aFormat; sal_uLong nLineNumber; - ByteString aUniqId; - ByteString aLineType; - ByteString aLangId; - ByteString aText; - ByteString aQuickHelpText; - ByteString aTitle; + rtl::OString aUniqId; + rtl::OString aLineType; + rtl::OString aLangId; + rtl::OString aText; + rtl::OString aQuickHelpText; + rtl::OString aTitle; sal_Bool bOK; sal_Bool bFixed; @@ -58,22 +57,24 @@ private: void ReassembleLine(); public: - GSILine( const ByteString &rLine, sal_uLong nLine ); + rtl::OString data_; + + GSILine( const rtl::OString &rLine, sal_uLong nLine ); LineFormat GetLineFormat() const { return aFormat; } sal_uLong GetLineNumber() const { return nLineNumber; } - ByteString const GetUniqId() const { return aUniqId; } - ByteString const GetLineType() const { return aLineType; } - ByteString const GetLanguageId() const { return aLangId; } - ByteString const GetText() const { return aText; } - String const GetUText() const { return String( aText, RTL_TEXTENCODING_UTF8 ); } - ByteString const GetQuickHelpText() const { return aQuickHelpText; } - ByteString const GetTitle() const { return aTitle; } + rtl::OString const GetUniqId() const { return aUniqId; } + rtl::OString const GetLineType() const { return aLineType; } + rtl::OString const GetLanguageId() const { return aLangId; } + rtl::OString const GetText() const { return aText; } + rtl::OUString const GetUText() const { return rtl::OStringToOUString( aText, RTL_TEXTENCODING_UTF8 ); } + rtl::OString const GetQuickHelpText() const { return aQuickHelpText; } + rtl::OString const GetTitle() const { return aTitle; } void SetUText( String &aNew ) { aText = rtl::OUStringToOString(aNew, RTL_TEXTENCODING_UTF8); ReassembleLine(); } - void SetText( ByteString &aNew ) { aText = aNew; ReassembleLine(); } - void SetQuickHelpText( ByteString &aNew ) { aQuickHelpText = aNew; ReassembleLine(); } - void SetTitle( ByteString &aNew ) { aTitle = aNew; ReassembleLine(); } + void SetText( rtl::OString const &aNew ) { aText = aNew; ReassembleLine(); } + void SetQuickHelpText( rtl::OString const &aNew ) { aQuickHelpText = aNew; ReassembleLine(); } + void SetTitle( rtl::OString const &aNew ) { aTitle = aNew; ReassembleLine(); } ParserMessageList* GetMessageList() { return &aMessages; }; sal_Bool HasMessages(){ return ( aMessages.size() > 0 ); }; @@ -99,7 +100,7 @@ private: GSIBlock_Impl maList; GSILine *pSourceLine; GSILine *pReferenceLine; - void PrintList( ParserMessageList *pList, ByteString aPrefix, GSILine *pLine ); + void PrintList( ParserMessageList *pList, rtl::OString const & aPrefix, GSILine *pLine ); sal_Bool bPrintContext; sal_Bool bCheckSourceLang; sal_Bool bCheckTranslationLang; @@ -108,15 +109,15 @@ private: sal_Bool bHasBlockError; - sal_Bool IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const; + sal_Bool IsUTF8( const rtl::OString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, rtl::OString &aErrorMsg, sal_Bool &bHasBeenFixed, rtl::OString &aFixed ) const; sal_Bool TestUTF8( GSILine* pTestee, sal_Bool bFixTags ); sal_Bool HasSuspiciousChars( GSILine* pTestee, GSILine* pSource ); public: GSIBlock( sal_Bool PbPrintContext, sal_Bool bSource, sal_Bool bTrans, sal_Bool bRef, sal_Bool bAllowSusp ); ~GSIBlock(); - 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 PrintMessage( rtl::OString const & aType, rtl::OString const & aMsg, rtl::OString const & aPrefix, rtl::OString const & aContext, sal_uLong nLine, rtl::OString const & aUniqueId = rtl::OString() ); + void PrintError( rtl::OString const & aMsg, rtl::OString const & aPrefix, rtl::OString const & aContext, sal_uLong nLine, rtl::OString const & aUniqueId = rtl::OString() ); void InsertLine( GSILine* pLine, const rtl::OString &rSourceLang); void SetReferenceLine( GSILine* pLine ); sal_Bool CheckSyntax( sal_uLong nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags ); diff --git a/l10ntools/inc/helpmerge.hxx b/l10ntools/inc/helpmerge.hxx index 3e8383ac1da0..6a347464cb62 100644 --- a/l10ntools/inc/helpmerge.hxx +++ b/l10ntools/inc/helpmerge.hxx @@ -39,43 +39,43 @@ class HelpParser { private: - ByteString sHelpFile; + rtl::OString sHelpFile; bool bUTF8; bool bHasInputList; #if OSL_DEBUG_LEVEL > 2 /// Debugmethod, prints the content of the map to stdout - static void Dump(LangHashMap* rElem_in , const ByteString sKey_in); + static void Dump(LangHashMap* rElem_in , const rtl::OString & sKey_in); /// Debugmethod, prints the content of the map to stdout static void Dump(XMLHashMap* rElem_in); #endif public: - HelpParser( const ByteString &rHelpFile, bool bUTF8 , bool bHasInputList ); + HelpParser( const rtl::OString &rHelpFile, bool bUTF8 , bool bHasInputList ); ~HelpParser(){}; /// Method creates/append a SDF file with the content of a parsed XML file /// @PRECOND rHelpFile is valid - static bool CreateSDF( const ByteString &rSDFFile_in, const ByteString &rPrj_in, const ByteString &rRoot_in, - const ByteString &sHelpFile, XMLFile *pXmlFile, const ByteString &rGsi1 ); + static bool CreateSDF( const rtl::OString &rSDFFile_in, const rtl::OString &rPrj_in, const rtl::OString &rRoot_in, + const rtl::OString &sHelpFile, XMLFile *pXmlFile, const rtl::OString &rGsi1 ); static void parse_languages( std::vector<rtl::OString>& aLanguages , MergeDataFile& aMergeDataFile ); /// Method merges the String from the SDFfile into XMLfile. Both Strings must /// point to existing files. - bool Merge( const ByteString &rSDFFile_in, const ByteString &rDestinationFile_in , + bool Merge( const rtl::OString &rSDFFile_in, const rtl::OString &rDestinationFile_in , const rtl::OString& sLanguage , MergeDataFile& aMergeDataFile ); - bool Merge( const ByteString &rSDFFile, const ByteString &rPathX , const ByteString &rPathY , bool bISO + bool Merge( const rtl::OString &rSDFFile, const rtl::OString &rPathX , const rtl::OString &rPathY , bool bISO , const std::vector<rtl::OString>& aLanguages , MergeDataFile& aMergeDataFile , bool bCreateDir ); private: static rtl::OString makeAbsolutePath(const rtl::OString& sHelpFile , const rtl::OString& rRoot_in); - ByteString GetOutpath( const ByteString& rPathX , const ByteString& sCur , const ByteString& rPathY ); - bool MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile , const ByteString& sLanguage , ByteString sPath ); + rtl::OString GetOutpath( const rtl::OString& rPathX , const rtl::OString& sCur , const rtl::OString& rPathY ); + bool MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile , const rtl::OString& sLanguage , rtl::OString const & sPath ); - void ProcessHelp( LangHashMap* aLangHM , const ByteString& sCur , ResData *pResData , MergeDataFile& aMergeDataFile ); + void ProcessHelp( LangHashMap* aLangHM , const rtl::OString& sCur , ResData *pResData , MergeDataFile& aMergeDataFile ); void MakeDir(const rtl::OString& rPath); }; diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx index 2a4a0d31db1f..d6a0ebd4e2cf 100644 --- a/l10ntools/inc/lngmerge.hxx +++ b/l10ntools/inc/lngmerge.hxx @@ -55,8 +55,8 @@ private: bool isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in); void ReadLine(const rtl::OString &rLine_in, - ByteStringHashMap &rText_inout); - void WriteSDF(SvFileStream &aSDFStream, ByteStringHashMap &rText_inout, + OStringHashMap &rText_inout); + void WriteSDF(SvFileStream &aSDFStream, OStringHashMap &rText_inout, const rtl::OString &rPrj, const rtl::OString &rRoot, const rtl::OString &rActFileName, const rtl::OString &rID); public: diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx index c6fe74055080..3b3e4baa9108 100644 --- a/l10ntools/inc/xmlparse.hxx +++ b/l10ntools/inc/xmlparse.hxx @@ -64,30 +64,31 @@ using namespace std; /** Holds data of Attributes */ -class XMLAttribute : public String +class XMLAttribute { private: - String sValue; + rtl::OUString sName; + rtl::OUString sValue; public: /// creates an attribute XMLAttribute( - const String &rName, // attributes name - const String &rValue // attributes data + const rtl::OUString &rName, // attributes name + const rtl::OUString &rValue // attributes data ) - : String( rName ), sValue( rValue ) {} + : sName( rName ), sValue( rValue ) {} - /// getting value of an attribue - const String &GetValue() { return sValue; } + rtl::OUString GetName() const { return sName; } + rtl::OUString GetValue() const { return sValue; } - void setValue(const String &rValue){sValue=rValue;} + void setValue(const rtl::OUString &rValue){sValue=rValue;} /// returns true if two attributes are equal and have the same value sal_Bool IsEqual( const XMLAttribute &rAttribute // the attribute which has to be equal ) { - return (( rAttribute == *this ) && ( rAttribute.sValue == sValue )); + return (( rAttribute.sName == sName ) && ( rAttribute.sValue == sValue )); } }; @@ -172,7 +173,6 @@ public: XMLChildNode *pChild , size_t pos /// the new child ); - virtual int GetPosition( ByteString id ); int RemoveChild( XMLElement *pRefElement ); void RemoveAndDeleteAllChildren(); @@ -204,18 +204,17 @@ class XMLFile : public XMLParentNode { public: XMLFile( - const String &rFileName // the file name, empty if created from memory stream + const rtl::OUString &rFileName // the file name, empty if created from memory stream ); XMLFile( const XMLFile& obj ) ; ~XMLFile(); - ByteString* GetGroupID(std::deque<rtl::OString> &groupid); void Print( XMLNode *pCur = NULL, sal_uInt16 nLevel = 0 ); virtual void SearchL10NElements( XMLParentNode *pCur, int pos = 0 ); void Extract( XMLFile *pCur = NULL ); XMLHashMap* GetStrings(){return XMLStrings;} - sal_Bool Write( ByteString &rFilename ); + sal_Bool Write( rtl::OString const &rFilename ); sal_Bool Write( ofstream &rStream , XMLNode *pCur = NULL ); bool CheckExportStatus( XMLParentNode *pCur = NULL );// , int pos = 0 ); @@ -277,7 +276,7 @@ class XMLElement : public XMLParentNode private: String sElementName; XMLAttributeList *pAttributes; - ByteString project, + rtl::OString project, filename, id, sOldRef, @@ -332,23 +331,23 @@ public: /// returns a attribute XMLAttribute *GetAttribute( - const String &rName // the attribute name + const rtl::OUString &rName // the attribute name ); - void SetProject ( ByteString prj ){ project = prj; } - void SetFileName ( ByteString fn ){ filename = fn; } - void SetId ( ByteString theId ){ id = theId; } - void SetResourceType ( ByteString rt ){ resourceType = rt; } - void SetLanguageId ( ByteString lid ){ languageId = lid; } + void SetProject ( rtl::OString const & prj ){ project = prj; } + void SetFileName ( rtl::OString const & fn ){ filename = fn; } + void SetId ( rtl::OString const & theId ){ id = theId; } + void SetResourceType ( rtl::OString const & rt ){ resourceType = rt; } + void SetLanguageId ( rtl::OString const & lid ){ languageId = lid; } void SetPos ( int nPos_in ){ nPos = nPos_in; } - void SetOldRef ( ByteString sOldRef_in ){ sOldRef = sOldRef_in; } + void SetOldRef ( rtl::OString const & sOldRef_in ){ sOldRef = sOldRef_in; } virtual int GetPos() { return nPos; } - ByteString GetProject() { return project; } - ByteString GetFileName() { return filename; } - ByteString GetId() { return id; } - ByteString GetOldref() { return sOldRef; } - ByteString GetResourceType(){ return resourceType; } - ByteString GetLanguageId() { return languageId; } + rtl::OString GetProject() { return project; } + rtl::OString GetFileName() { return filename; } + rtl::OString GetId() { return id; } + rtl::OString GetOldref() { return sOldRef; } + rtl::OString GetResourceType(){ return resourceType; } + rtl::OString GetLanguageId() { return languageId; } }; |