Index: src/af/util/xp/ut_uuid.cpp =================================================================== RCS file: /cvsroot/abi/src/af/util/xp/ut_uuid.cpp,v retrieving revision 1.17 diff -u -r1.17 ut_uuid.cpp --- src/af/util/xp/ut_uuid.cpp 6 Mar 2004 19:16:45 -0000 1.17 +++ src/af/util/xp/ut_uuid.cpp 19 Aug 2004 21:57:58 -0000 @@ -60,9 +60,9 @@ The following two constructors instantiate the class from existing UUIDs for further processing */ -UT_UUID::UT_UUID(const UT_String &s) +UT_UUID::UT_UUID(const UT_UTF8String &s) { - m_bIsValid = _parse(s.c_str(), m_uuid); + m_bIsValid = _parse(s.utf8_str(), m_uuid); // if the UUID was not valid, we will generate a new one if(!m_bIsValid) @@ -138,9 +138,9 @@ /*! convert internal UUID struct to a string */ -bool UT_UUID::_toString(const uuid &uu, UT_String & s) const +bool UT_UUID::_toString(const uuid &uu, UT_UTF8String & s) const { - UT_String_sprintf(s,"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + UT_UTF8String_sprintf(s,"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uu.time_low, uu.time_mid, uu.time_high_and_version, uu.clock_seq >> 8, uu.clock_seq & 0xFF, uu.node[0], uu.node[1], uu.node[2], @@ -152,7 +152,7 @@ /*! convert internal state to string */ -bool UT_UUID::toString(UT_String & s) const +bool UT_UUID::toString(UT_UTF8String & s) const { UT_return_val_if_fail(m_bIsValid, false); return _toString(m_uuid, s); @@ -161,9 +161,9 @@ /*! Set internal state to the given value represented by string */ -bool UT_UUID::setUUID(const UT_String &s) +bool UT_UUID::setUUID(const UT_UTF8String &s) { - if(_parse(s.c_str(), m_uuid)) + if(_parse(s.utf8_str(), m_uuid)) { m_bIsValid = true; return true; @@ -195,7 +195,7 @@ /*! generate new UUID into provided string */ -bool UT_UUID::makeUUID(UT_String & s) +bool UT_UUID::makeUUID(UT_UTF8String & s) { struct uuid uuid; bool bRet = _makeUUID(uuid); Index: src/af/util/xp/ut_uuid.h =================================================================== RCS file: /cvsroot/abi/src/af/util/xp/ut_uuid.h,v retrieving revision 1.12 diff -u -r1.12 ut_uuid.h --- src/af/util/xp/ut_uuid.h 6 Mar 2004 19:16:46 -0000 1.12 +++ src/af/util/xp/ut_uuid.h 19 Aug 2004 21:57:58 -0000 @@ -36,7 +36,7 @@ #include "ut_vector.h" #include -class UT_String; +class UT_UTF8String; /* UUID Variant definitions */ @@ -94,15 +94,15 @@ /* These generate new UUIDs */ bool makeUUID(); // changes internal state - bool makeUUID(UT_String & out); // does not change internal state !!! + bool makeUUID(UT_UTF8String & out); // does not change internal state !!! /* these set m_uuid to given UUID, i.e., force internal state change */ - bool setUUID(const UT_String &s); + bool setUUID(const UT_UTF8String &s); bool setUUID(const char *s); /* translate internal state into string representation; do not change internal state */ - bool toString(UT_String & to) const; + bool toString(UT_UTF8String & to) const; /* create FNV hash of the uuid -- use UT_UUIDGenerator::getUUID*() instead of these; it provides collision correction*/ @@ -148,7 +148,7 @@ /* various protected constructors */ UT_UUID(); // constructs NULL uuid; subsequent call to makeUUID() needed to initialise - UT_UUID(const UT_String &s); // initialises from string + UT_UUID(const UT_UTF8String &s); // initialises from string UT_UUID(const char *s); // initialises from string UT_UUID(const UT_UUID &u); // copy constructor @@ -161,7 +161,7 @@ bool _parse(const char * in, struct uuid &u) const; bool _makeUUID(struct uuid & u); - bool _toString(const struct uuid &uu, UT_String & s) const; + bool _toString(const struct uuid &uu, UT_UTF8String & s) const; time_t _getTime(const struct uuid & uu) const; UT_sint32 _getType(const struct uuid &uu) const; @@ -203,7 +203,7 @@ // to call makeUUID() with this one virtual UT_UUID * createUUID(){UT_UUID *p = new UT_UUID(); if(p)p->makeUUID(); return p;} - virtual UT_UUID * createUUID(const UT_String &s){return new UT_UUID(s);} + virtual UT_UUID * createUUID(const UT_UTF8String &s){return new UT_UUID(s);} virtual UT_UUID * createUUID(const char *s){return new UT_UUID(s);} virtual UT_UUID * createUUID(const UT_UUID &u){return new UT_UUID(u);} Index: src/af/xap/xp/xad_Document.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xad_Document.cpp,v retrieving revision 1.48 diff -u -r1.48 xad_Document.cpp --- src/af/xap/xp/xad_Document.cpp 18 Aug 2004 16:00:25 -0000 1.48 +++ src/af/xap/xp/xad_Document.cpp 19 Aug 2004 21:58:00 -0000 @@ -504,9 +504,9 @@ const char * AD_Document::getDocUUIDString() const { UT_return_val_if_fail(m_pUUID, NULL); - static UT_String s; + static UT_UTF8String s; m_pUUID->toString(s); - return s.c_str(); + return s.utf8_str(); } /////////////////////////////////////////////////////////////////// @@ -1162,7 +1162,7 @@ // constructors for importers -AD_VersionData::AD_VersionData(UT_uint32 v, UT_String &uuid, time_t start, bool autorev): +AD_VersionData::AD_VersionData(UT_uint32 v, UT_UTF8String &uuid, time_t start, bool autorev): m_iId(v),m_pUUID(NULL),m_tStart(start),m_bAutoRevision(autorev) { UT_UUIDGenerator * pGen = XAP_App::getApp()->getUUIDGenerator(); Index: src/af/xap/xp/xad_Document.h =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xad_Document.h,v retrieving revision 1.45 diff -u -r1.45 xad_Document.h --- src/af/xap/xp/xad_Document.h 18 Aug 2004 16:00:25 -0000 1.45 +++ src/af/xap/xp/xad_Document.h 19 Aug 2004 21:58:00 -0000 @@ -49,7 +49,7 @@ public: // constructor for importers - AD_VersionData(UT_uint32 v, UT_String &uuid, time_t start, bool autorev); + AD_VersionData(UT_uint32 v, UT_UTF8String &uuid, time_t start, bool autorev); AD_VersionData(UT_uint32 v, const char * uuid, time_t start, bool autorev); // constructor for new entries Index: src/wp/impexp/xp/ie_exp_AbiWord_1.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp,v retrieving revision 1.162 diff -u -r1.162 ie_exp_AbiWord_1.cpp --- src/wp/impexp/xp/ie_exp_AbiWord_1.cpp 18 Aug 2004 16:01:55 -0000 1.162 +++ src/wp/impexp/xp/ie_exp_AbiWord_1.cpp 19 Aug 2004 21:58:03 -0000 @@ -1346,27 +1346,27 @@ time_t tStarted = m_pDocument->getHistoryNthTimeStarted(k); bool bAuto = m_pDocument->getHistoryNthAutoRevisioned(k); - UT_String s, hUid; + UT_UTF8String s, hUid; UID.toString(hUid); if (!bWroteOpenSection) { - UT_String_sprintf(s, "\n", m_pDocument->getDocVersion(), m_pDocument->getEditTime(), m_pDocument->getLastSavedTime(), m_pDocument->getDocUUIDString()); - m_pie->write(s.c_str()); + m_pie->write(s.utf8_str()); bWroteOpenSection = true; } - UT_String_sprintf(s, "\n", - iVersion, tStarted, hUid.c_str(),bAuto); + UT_UTF8String_sprintf(s, "\n", + iVersion, tStarted, hUid.utf8_str(),bAuto); - m_pie->write(s.c_str()); + m_pie->write(s.utf8_str()); } if (bWroteOpenSection)