diff options
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/selectlabeldialog.cxx | 20 | ||||
-rw-r--r-- | extensions/source/propctrlr/taborder.cxx | 2 | ||||
-rw-r--r-- | extensions/source/update/tools/ztool.cxx | 4 | ||||
-rw-r--r-- | svl/inc/svl/adrparse.hxx | 49 | ||||
-rw-r--r-- | svl/inc/svl/cenumitm.hxx | 2 | ||||
-rw-r--r-- | svl/inc/svl/fstathelper.hxx | 8 | ||||
-rw-r--r-- | svl/inc/svl/visitem.hxx | 2 | ||||
-rw-r--r-- | svl/source/items/cenumitm.cxx | 7 | ||||
-rw-r--r-- | svl/source/items/visitem.cxx | 7 | ||||
-rw-r--r-- | svl/source/misc/adrparse.cxx | 106 | ||||
-rw-r--r-- | svl/source/misc/fstathelper.cxx | 6 | ||||
-rw-r--r-- | svx/inc/svx/sdooitm.hxx | 2 | ||||
-rw-r--r-- | svx/inc/svx/sdynitm.hxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 14 | ||||
-rw-r--r-- | sw/inc/mdiexp.hxx | 6 | ||||
-rw-r--r-- | sw/inc/swtypes.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin3.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/dialmgr.hxx | 2 |
21 files changed, 123 insertions, 132 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index ec74b25a0bf2..d7082e6a1473 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -150,9 +150,9 @@ void SvxHyperlinkInternetTp::FillDlgFields ( String& aStrURL ) void SvxHyperlinkInternetTp::setAnonymousFTPUser() { - maEdLogin.SetText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( sAnonymous ) ) ); + maEdLogin.SetText(rtl::OUString(sAnonymous)); SvAddressParser aAddress( SvtUserOptions().GetEmail() ); - maEdPassword.SetText( aAddress.Count() ? aAddress.GetEmailAddress(0) : String() ); + maEdPassword.SetText( aAddress.Count() ? aAddress.GetEmailAddress(0) : rtl::OUString() ); maFtLogin.Disable (); maFtPassword.Disable (); diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 655fd3fe1431..e559ca678b56 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -83,14 +83,15 @@ namespace pcr m_aControlTree.SetDeselectHdl(LINK(this, OSelectLabelDialog, OnEntrySelected)); // fill the description - UniString sDescription = m_aMainDesc.GetText(); + rtl::OUString sDescription = m_aMainDesc.GetText(); sal_Int16 nClassID = FormComponentType::CONTROL; if (::comphelper::hasProperty(PROPERTY_CLASSID, m_xControlModel)) nClassID = ::comphelper::getINT16(m_xControlModel->getPropertyValue(PROPERTY_CLASSID)); - sDescription.SearchAndReplace(String::CreateFromAscii("$control_class$"), GetUIHeadlineName(nClassID, makeAny(m_xControlModel))); - UniString sName = ::comphelper::getString(m_xControlModel->getPropertyValue(PROPERTY_NAME)).getStr(); - sDescription.SearchAndReplace(String::CreateFromAscii("$control_name$"), sName); + sDescription = sDescription.replaceAll(rtl::OUString("$control_class$"), + GetUIHeadlineName(nClassID, makeAny(m_xControlModel))); + rtl::OUString sName = ::comphelper::getString(m_xControlModel->getPropertyValue(PROPERTY_NAME)); + sDescription = sDescription.replaceAll(rtl::OUString("$control_name$"), sName); m_aMainDesc.SetText(sDescription); // search for the root of the form hierarchy @@ -181,7 +182,7 @@ namespace pcr return 0; sal_Int32 nChildren = 0; - UniString sName,sDisplayName; + rtl::OUString sName; Reference< XPropertySet > xAsSet; for (sal_Int32 i=0; i<xContainer->getCount(); ++i) { @@ -228,10 +229,11 @@ namespace pcr // get the label if (!::comphelper::hasProperty(PROPERTY_LABEL, xAsSet)) continue; - sDisplayName = ::comphelper::getString(xAsSet->getPropertyValue(PROPERTY_LABEL)).getStr(); - sDisplayName += String::CreateFromAscii(" ("); - sDisplayName += sName; - sDisplayName += ')'; + + rtl::OUString sDisplayName = rtl::OUStringBuffer( + ::comphelper::getString(xAsSet->getPropertyValue(PROPERTY_LABEL))). + appendAscii(RTL_CONSTASCII_STRINGPARAM(" (")).append(sName).append(')'). + makeStringAndClear(); // all requirements met -> insert SvLBoxEntry* pCurrent = m_aControlTree.InsertEntry(sDisplayName, m_aRequiredControlImage, m_aRequiredControlImage, pContainerEntry); diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index 767cfabc728f..8049ec877411 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -336,7 +336,7 @@ namespace pcr //------------------------------------------------------------------------ void TabOrderListBox::MoveSelection( long nRelPos ) { - UniString aSelEntryPrevText,aSelEntryNextText; + rtl::OUString aSelEntryPrevText, aSelEntryNextText; Image aImage; for (long i=0; i<labs(nRelPos); i++) { diff --git a/extensions/source/update/tools/ztool.cxx b/extensions/source/update/tools/ztool.cxx index 64803ceb313e..63930e1f9da2 100644 --- a/extensions/source/update/tools/ztool.cxx +++ b/extensions/source/update/tools/ztool.cxx @@ -43,8 +43,8 @@ int SAL_CALL main( int argc, char **argv ) show_usage(); return -1; } - UniString aInName = UniString::CreateFromAscii( argv[1] ); - UniString aOutName = UniString::CreateFromAscii( argv[2] ); + rtl::OUString aInName = rtl::OUString::createFromAscii(argv[1]); + rtl::OUString aOutName = rtl::OUString::createFromAscii(argv[2]); SvFileStream aInFile( aInName, STREAM_READ ); SvFileStream aOutFile( aOutName, STREAM_WRITE | STREAM_TRUNC ); diff --git a/svl/inc/svl/adrparse.hxx b/svl/inc/svl/adrparse.hxx index e9f479af9e09..bfedd48aa836 100644 --- a/svl/inc/svl/adrparse.hxx +++ b/svl/inc/svl/adrparse.hxx @@ -36,13 +36,19 @@ //============================================================================ struct SvAddressEntry_Impl { - UniString m_aAddrSpec; - UniString m_aRealName; - - SvAddressEntry_Impl() {}; - SvAddressEntry_Impl(UniString const & rTheAddrSpec, - UniString const & rTheRealName): - m_aAddrSpec(rTheAddrSpec), m_aRealName(rTheRealName) {} + rtl::OUString m_aAddrSpec; + rtl::OUString m_aRealName; + + SvAddressEntry_Impl() + { + } + + SvAddressEntry_Impl(const rtl::OUString& rTheAddrSpec, + const rtl::OUString& rTheRealName) + : m_aAddrSpec(rTheAddrSpec) + , m_aRealName(rTheRealName) + { + } }; //============================================================================ @@ -58,30 +64,25 @@ class SVL_DLLPUBLIC SvAddressParser bool m_bHasFirst; public: - SvAddressParser(UniString const & rInput); + SvAddressParser(const rtl::OUString& rInput); ~SvAddressParser(); sal_Int32 Count() const { return m_bHasFirst ? m_aRest.size() + 1 : 0; } - inline UniString const & GetEmailAddress(sal_Int32 nIndex) const; - - inline UniString const &GetRealName(sal_Int32 nIndex) const; + const rtl::OUString& GetEmailAddress(sal_Int32 nIndex) const + { + return nIndex == 0 ? m_aFirst.m_aAddrSpec : + m_aRest[ nIndex - 1 ]->m_aAddrSpec; + } + + const rtl::OUString& GetRealName(sal_Int32 nIndex) const + { + return nIndex == 0 ? m_aFirst.m_aRealName : + m_aRest[ nIndex - 1 ]->m_aRealName; + } }; -inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex) - const -{ - return nIndex == 0 ? m_aFirst.m_aAddrSpec : - m_aRest[ nIndex - 1 ]->m_aAddrSpec; -} - -inline UniString const & SvAddressParser::GetRealName(sal_Int32 nIndex) const -{ - return nIndex == 0 ? m_aFirst.m_aRealName : - m_aRest[ nIndex - 1 ]->m_aRealName; -} - #endif // _ADRPARSE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/inc/svl/cenumitm.hxx b/svl/inc/svl/cenumitm.hxx index b74de9373f6a..0b710b90854d 100644 --- a/svl/inc/svl/cenumitm.hxx +++ b/svl/inc/svl/cenumitm.hxx @@ -167,7 +167,7 @@ public: virtual sal_uInt16 GetValueCount() const; - virtual UniString GetValueTextByVal(sal_Bool bTheValue) const; + virtual rtl::OUString GetValueTextByVal(sal_Bool bTheValue) const; sal_Bool GetValue() const { return m_bValue; } diff --git a/svl/inc/svl/fstathelper.hxx b/svl/inc/svl/fstathelper.hxx index fcc71502e639..4369ce6b1b0d 100644 --- a/svl/inc/svl/fstathelper.hxx +++ b/svl/inc/svl/fstathelper.hxx @@ -30,9 +30,9 @@ #define _SVTOOLS_FSTATHELPER_HXX #include "svl/svldllapi.h" +#include <rtl/ustring.hxx> #include <tools/solar.h> -class UniString; class Date; class Time; @@ -48,18 +48,18 @@ namespace FStatHelper { @return it was be able to get the date/time stamp */ -SVL_DLLPUBLIC sal_Bool GetModifiedDateTimeOfFile( const UniString& rURL, +SVL_DLLPUBLIC sal_Bool GetModifiedDateTimeOfFile( const rtl::OUString& rURL, Date* pDate, Time* pTime ); /** Return if under the URL a document exist. This is only a wrapper for the UCB.IsContent. */ -SVL_DLLPUBLIC sal_Bool IsDocument( const UniString& rURL ); +SVL_DLLPUBLIC sal_Bool IsDocument( const rtl::OUString& rURL ); /** Return if under the URL a folder exist. This is only a wrapper for the UCB.isFolder. */ -SVL_DLLPUBLIC sal_Bool IsFolder( const UniString& rURL ); +SVL_DLLPUBLIC sal_Bool IsFolder( const rtl::OUString& rURL ); } diff --git a/svl/inc/svl/visitem.hxx b/svl/inc/svl/visitem.hxx index 70f3ce994754..960bfc938985 100644 --- a/svl/inc/svl/visitem.hxx +++ b/svl/inc/svl/visitem.hxx @@ -84,7 +84,7 @@ public: virtual sal_uInt16 GetValueCount() const; - virtual UniString GetValueTextByVal(sal_Bool bTheValue) const; + virtual rtl::OUString GetValueTextByVal(sal_Bool bTheValue) const; sal_Bool GetValue() const { return m_nValue.bVisible; } diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index c471782d1fbc..9d91e03a8c4c 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -281,12 +281,9 @@ sal_uInt16 CntBoolItem::GetValueCount() const //============================================================================ // virtual -UniString CntBoolItem::GetValueTextByVal(sal_Bool bTheValue) const +rtl::OUString CntBoolItem::GetValueTextByVal(sal_Bool bTheValue) const { - return - bTheValue ? - UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TRUE")) : - UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("FALSE")); + return bTheValue ? rtl::OUString("TRUE") : rtl::OUString("FALSE"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx index c9e75356f456..6453efc0c52d 100644 --- a/svl/source/items/visitem.cxx +++ b/svl/source/items/visitem.cxx @@ -135,12 +135,9 @@ sal_uInt16 SfxVisibilityItem::GetValueCount() const //============================================================================ // virtual -UniString SfxVisibilityItem::GetValueTextByVal(sal_Bool bTheValue) const +rtl::OUString SfxVisibilityItem::GetValueTextByVal(sal_Bool bTheValue) const { - return - bTheValue ? - UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TRUE")) : - UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("FALSE")); + return bTheValue ? rtl::OUString("TRUE") : rtl::OUString("FALSE"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index 99ce5ef837cf..b5a8ddcc8ebc 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -27,6 +27,7 @@ ************************************************************************/ #include <tools/inetmime.hxx> +#include <rtl/ustrbuf.hxx> #include <svl/adrparse.hxx> namespace @@ -114,14 +115,14 @@ class SvAddressParser_Impl bool readToken(); - static UniString reparse(sal_Unicode const * pBegin, + static rtl::OUString reparse(sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bAddrSpec); - static UniString reparseComment(sal_Unicode const * pBegin, + static rtl::OUString reparseComment(sal_Unicode const * pBegin, sal_Unicode const * pEnd); public: - SvAddressParser_Impl(SvAddressParser * pParser, UniString const & rInput); + SvAddressParser_Impl(SvAddressParser * pParser, const rtl::OUString& rIn); }; inline void SvAddressParser_Impl::resetRealNameAndFirstComment() @@ -326,11 +327,10 @@ bool SvAddressParser_Impl::readToken() //============================================================================ // static -UniString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin, - sal_Unicode const * pEnd, - bool bAddrSpec) +rtl::OUString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin, + sal_Unicode const * pEnd, bool bAddrSpec) { - UniString aResult; + rtl::OUStringBuffer aResult; TokenType eMode = TOKEN_ATOM; bool bEscaped = false; bool bEndsWithSpace = false; @@ -343,44 +343,44 @@ UniString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin, case TOKEN_QUOTED: if (bEscaped) { - aResult += cChar; + aResult.append(cChar); bEscaped = false; } else if (cChar == '"') { if (bAddrSpec) - aResult += cChar; + aResult.append(cChar); eMode = TOKEN_ATOM; } else if (cChar == '\\') { if (bAddrSpec) - aResult += cChar; + aResult.append(cChar); bEscaped = true; } else - aResult += cChar; + aResult.append(cChar); break; case TOKEN_DOMAIN: if (bEscaped) { - aResult += cChar; + aResult.append(cChar); bEscaped = false; } else if (cChar == ']') { - aResult += cChar; + aResult.append(cChar); eMode = TOKEN_ATOM; } else if (cChar == '\\') { if (bAddrSpec) - aResult += cChar; + aResult.append(cChar); bEscaped = true; } else - aResult += cChar; + aResult.append(cChar); break; case TOKEN_COMMENT: @@ -402,7 +402,7 @@ UniString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin, { if (!bAddrSpec && !bEndsWithSpace) { - aResult += ' '; + aResult.append(' '); bEndsWithSpace = true; } } @@ -410,7 +410,7 @@ UniString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin, { if (!bAddrSpec && !bEndsWithSpace) { - aResult += ' '; + aResult.append(' '); bEndsWithSpace = true; } eMode = TOKEN_COMMENT; @@ -421,45 +421,45 @@ UniString SvAddressParser_Impl::reparse(sal_Unicode const * pBegin, if (cChar == '"') { if (bAddrSpec) - aResult += cChar; + aResult.append(cChar); eMode = TOKEN_QUOTED; } else if (cChar == '[') { - aResult += cChar; + aResult.append(cChar); eMode = TOKEN_QUOTED; } else - aResult += cChar; + aResult.append(cChar); } break; } } - return aResult; + return aResult.makeStringAndClear(); } //============================================================================ // static -UniString SvAddressParser_Impl::reparseComment(sal_Unicode const * pBegin, - sal_Unicode const * pEnd) +rtl::OUString SvAddressParser_Impl::reparseComment(sal_Unicode const * pBegin, + sal_Unicode const * pEnd) { - UniString aResult; + rtl::OUStringBuffer aResult; while (pBegin < pEnd) { sal_Unicode cChar = *pBegin++; if (cChar == '\\') cChar = *pBegin++; - aResult += cChar; + aResult.append(cChar); } - return aResult; + return aResult.makeStringAndClear(); } //============================================================================ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, - UniString const & rInput) + const rtl::OUString& rInput) { - m_pInputPos = rInput.GetBuffer(); - m_pInputEnd = m_pInputPos + rInput.Len(); + m_pInputPos = rInput.getStr(); + m_pInputEnd = m_pInputPos + rInput.getLength(); reset(); bool bDone = false; @@ -633,27 +633,25 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, &m_aOuterAddrSpec : 0; if (m_pAddrSpec) { - UniString aTheAddrSpec; + rtl::OUString aTheAddrSpec; if (m_pAddrSpec->m_bReparse) aTheAddrSpec = reparse(m_pAddrSpec->m_pBegin, m_pAddrSpec->m_pEnd, true); else { - xub_StrLen nLen = - sal::static_int_cast< xub_StrLen >( + sal_Int32 nLen = ( m_pAddrSpec->m_pEnd - m_pAddrSpec->m_pBegin); - if (nLen == rInput.Len()) + if (nLen == rInput.getLength()) aTheAddrSpec = rInput; else aTheAddrSpec - = rInput.Copy( - sal::static_int_cast< xub_StrLen >( - m_pAddrSpec->m_pBegin - - rInput.GetBuffer()), + = rInput.copy( + (m_pAddrSpec->m_pBegin + - rInput.getStr()), nLen); } - UniString aTheRealName; + rtl::OUString aTheRealName; if (!m_pRealNameBegin || (m_pAddrSpec == &m_aOuterAddrSpec && m_pRealNameBegin @@ -668,31 +666,26 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, m_pFirstCommentEnd); else aTheRealName - = rInput.Copy( - sal::static_int_cast< xub_StrLen >( - m_pFirstCommentBegin - - rInput.GetBuffer()), - sal::static_int_cast< xub_StrLen >( - m_pFirstCommentEnd - - m_pFirstCommentBegin)); + = rInput.copy( + (m_pFirstCommentBegin + - rInput.getStr()), + (m_pFirstCommentEnd + - m_pFirstCommentBegin)); else if (m_bRealNameReparse) aTheRealName = reparse(m_pRealNameBegin, m_pRealNameEnd, false); else { - xub_StrLen nLen = - sal::static_int_cast< xub_StrLen >( - m_pRealNameContentEnd - - m_pRealNameContentBegin); - if (nLen == rInput.Len()) + sal_Int32 nLen = + (m_pRealNameContentEnd + - m_pRealNameContentBegin); + if (nLen == rInput.getLength()) aTheRealName = rInput; else aTheRealName - = rInput.Copy( - sal::static_int_cast< xub_StrLen >( - m_pRealNameContentBegin - - rInput.GetBuffer()), - nLen); + = rInput.copy( + (m_pRealNameContentBegin + - rInput.getStr()), nLen); } if (pParser->m_bHasFirst) pParser->m_aRest.push_back(new SvAddressEntry_Impl( @@ -761,7 +754,8 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, // //============================================================================ -SvAddressParser::SvAddressParser(UniString const & rInput): m_bHasFirst(false) +SvAddressParser::SvAddressParser(const rtl::OUString& rInput) + : m_bHasFirst(false) { SvAddressParser_Impl aDoParse(this, rInput); } diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx index b6c0a11dd5f5..bd504651e5db 100644 --- a/svl/source/misc/fstathelper.cxx +++ b/svl/source/misc/fstathelper.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::rtl; -sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const UniString& rURL, +sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const rtl::OUString& rURL, Date* pDate, Time* pTime ) { sal_Bool bRet = sal_False; @@ -66,7 +66,7 @@ sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const UniString& rURL, return bRet; } -sal_Bool FStatHelper::IsDocument( const UniString& rURL ) +sal_Bool FStatHelper::IsDocument( const rtl::OUString& rURL ) { sal_Bool bExist = sal_False; try @@ -81,7 +81,7 @@ sal_Bool FStatHelper::IsDocument( const UniString& rURL ) return bExist; } -sal_Bool FStatHelper::IsFolder( const UniString& rURL ) +sal_Bool FStatHelper::IsFolder( const rtl::OUString& rURL ) { sal_Bool bExist = sal_False; try diff --git a/svx/inc/svx/sdooitm.hxx b/svx/inc/svx/sdooitm.hxx index 1bb3977df997..ce3a012f9a64 100644 --- a/svx/inc/svx/sdooitm.hxx +++ b/svx/inc/svx/sdooitm.hxx @@ -46,7 +46,7 @@ public: virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const; - virtual String GetValueTextByVal(sal_Bool bVal) const; + virtual rtl::OUString GetValueTextByVal(sal_Bool bVal) const; virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; }; diff --git a/svx/inc/svx/sdynitm.hxx b/svx/inc/svx/sdynitm.hxx index 9ca3f096705a..b876f3196b41 100644 --- a/svx/inc/svx/sdynitm.hxx +++ b/svx/inc/svx/sdynitm.hxx @@ -45,7 +45,7 @@ public: SdrYesNoItem(sal_uInt16 nId, SvStream& rIn): SfxBoolItem(nId,rIn) {} virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const; - virtual String GetValueTextByVal(sal_Bool bVal) const; + virtual rtl::OUString GetValueTextByVal(sal_Bool bVal) const; virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; }; diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index a71d98b45df7..d2728f557ad1 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -754,10 +754,11 @@ SfxPoolItem* SdrOnOffItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const return new SdrOnOffItem(Which(),rIn); } -XubString SdrOnOffItem::GetValueTextByVal(sal_Bool bVal) const +rtl::OUString SdrOnOffItem::GetValueTextByVal(sal_Bool bVal) const { - if (bVal) return ImpGetResStr(STR_ItemValON); - else return ImpGetResStr(STR_ItemValOFF); + if (bVal) + return ImpGetResStr(STR_ItemValON); + return ImpGetResStr(STR_ItemValOFF); } SfxItemPresentation SdrOnOffItem::GetPresentation(SfxItemPresentation ePres, @@ -786,10 +787,11 @@ SfxPoolItem* SdrYesNoItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const return new SdrYesNoItem(Which(),rIn); } -XubString SdrYesNoItem::GetValueTextByVal(sal_Bool bVal) const +rtl::OUString SdrYesNoItem::GetValueTextByVal(sal_Bool bVal) const { - if (bVal) return ImpGetResStr(STR_ItemValYES); - else return ImpGetResStr(STR_ItemValNO); + if (bVal) + return ImpGetResStr(STR_ItemValYES); + return ImpGetResStr(STR_ItemValNO); } SfxItemPresentation SdrYesNoItem::GetPresentation(SfxItemPresentation ePres, diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index a4e0e15a9eca..08211a269831 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -28,11 +28,11 @@ #ifndef _MDIEXP_HXX #define _MDIEXP_HXX +#include <rtl/ustring.hxx> #include <tools/solar.h> #include <tblenum.hxx> #include <swdllapi.h> -class UniString; class SwRect; class Size; class Dialog; @@ -48,7 +48,7 @@ extern void SizeNotify(ViewShell* pVwSh, const Size &); extern void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, - const UniString& rPg ); + const rtl::OUString& rPg ); enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END }; extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG ); @@ -72,7 +72,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc ); // Read ChgMode for tables from configuration. TblChgMode GetTblChgDefaultMode(); -sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark ); +sal_Bool JumpToSwMark( ViewShell* pVwSh, const rtl::OUString& rMark ); #endif diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 2b1ee116b6fb..7e466b40a8e6 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -171,7 +171,7 @@ enum RndStdIds extern ResMgr* pSwResMgr; // Is in swapp0.cxx. #define SW_RES(i) ResId(i,*pSwResMgr) -#define SW_RESSTR(i) UniString(ResId(i,*pSwResMgr)) +#define SW_RESSTR(i) ResId::toString(SW_RES(i)) ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > GetSpellChecker(); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index db0fdb55a0e9..d1c65420735c 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2628,7 +2628,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs) const CharSet eSrcCJKCharSet = bVer67 ? GetCurrentCJKCharSet() : RTL_TEXTENCODING_MS_1252; - // allocate UniString data + // allocate unicode string data rtl_uString *pStr = comphelper::string::rtl_uString_alloc(nStrLen); sal_Unicode* pBuffer = pStr->buffer; sal_Unicode* pWork = pBuffer; diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx index 3d053e8738e3..834851cfdccb 100644 --- a/sw/source/ui/docvw/edtwin3.cxx +++ b/sw/source/ui/docvw/edtwin3.cxx @@ -98,10 +98,8 @@ void SizeNotify(ViewShell* pVwSh, const Size &rSize) Description: Notify for page number update --------------------------------------------------------------------*/ - - void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, - const String& rPgStr) + const rtl::OUString& rPgStr) { SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell(); if ( pSfxVwSh && pSfxVwSh->ISA(SwView) && @@ -161,7 +159,7 @@ void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect ) ((SwPagePreView *)pSfxVwSh)->RepaintCoreRect( rRect ); } -sal_Bool JumpToSwMark( ViewShell* pVwSh, const String& rMark ) +sal_Bool JumpToSwMark( ViewShell* pVwSh, const rtl::OUString& rMark ) { SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell(); if( pSfxVwSh && pSfxVwSh->ISA( SwView ) ) diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index b73c8dbb9810..222fddfff16a 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1167,7 +1167,7 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& ) { nSubType = (nFormat == ULONG_MAX) ? nsSwGetSetExpType::GSE_STRING : nsSwGetSetExpType::GSE_EXPR; - if (nFormat == ULONG_MAX && aNumFormatLB.GetSelectEntry() == SW_RESSTR(FMT_USERVAR_CMD)) + if (nFormat == ULONG_MAX && aNumFormatLB.GetSelectEntry().Equals(SW_RESSTR(FMT_USERVAR_CMD))) nSubType |= nsSwExtendedSubType::SUB_CMD; if (aInvisibleCB.IsChecked()) diff --git a/sw/source/ui/inc/dialmgr.hxx b/sw/source/ui/inc/dialmgr.hxx index 8012a874212d..f4533a51ddc6 100644 --- a/sw/source/ui/inc/dialmgr.hxx +++ b/sw/source/ui/inc/dialmgr.hxx @@ -43,7 +43,7 @@ struct SwDialogsResMgr #define SWDIALOG_MGR() SwDialogsResMgr::GetResMgr() #define SW_RES(i) ResId(i,SWDIALOG_MGR()) -#define SW_RESSTR(i) UniString(ResId(i,SWDIALOG_MGR())) +#define SW_RESSTR(i) ResId::toString(SW_RES(i)) #endif |