diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-07 10:58:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-07 11:01:15 +0100 |
commit | b1153956a77eead5221b87ba1b3d3ba02f945a58 (patch) | |
tree | 6a1b71c4a6910086e1a0cdd192fe76b1d56dde91 /editeng/source | |
parent | 5af427d16eae480cd90f24a7120d7228ee0617c3 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editdbg.cxx | 22 | ||||
-rw-r--r-- | editeng/source/editeng/editdbg.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 12 |
3 files changed, 21 insertions, 15 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 5286318f53eb..fc5e51fe3638 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -65,6 +65,8 @@ #include <editdoc.hxx> #include <editdbg.hxx> +#include <rtl/strbuf.hxx> + #if defined( DBG_UTIL ) || ( OSL_DEBUG_LEVEL > 1 ) ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) @@ -536,20 +538,20 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) return aDebStr; } -ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions ) +rtl::OString EditDbg::GetTextPortionInfo(TextPortionList& rPortions) { - ByteString aDebStr; - for ( sal_uInt16 z = 0; z < rPortions.Count(); z++ ) + rtl::OStringBuffer aDebStr; + for (sal_uInt16 z = 0; z < rPortions.Count(); ++z) { TextPortion* pPortion = rPortions.GetObject( z ); - aDebStr += " "; - aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() ); - aDebStr += "("; - aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() ); - aDebStr += ")"; - aDebStr += ";"; + aDebStr.append(' '); + aDebStr.append(static_cast<sal_Int32>(pPortion->GetLen())); + aDebStr.append('('); + aDebStr.append(static_cast<sal_Int32>(pPortion->GetSize().Width())); + aDebStr.append(')'); + aDebStr.append(';'); } - return aDebStr; + return aDebStr.makeStringAndClear(); } void EditDbg::ShowPortionData( ParaPortion* pPortion ) diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx index e8e2e1f6385c..2088c758d7c8 100644 --- a/editeng/source/editeng/editdbg.hxx +++ b/editeng/source/editeng/editdbg.hxx @@ -50,7 +50,7 @@ public: static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True ); static void ShowPortionData( ParaPortion* pPortion ); static ByteString GetPortionInfo( ParaPortion* pPPortion ); - static ByteString GetTextPortionInfo( TextPortionList& rPortions ); + static rtl::OString GetTextPortionInfo(TextPortionList& rPortions); static ByteString GetUndoDebStr( EditUndoList* pUndoList ); }; diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 9f00bea57bca..272d0bef7b5d 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -980,13 +980,17 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, } // SWG: if ( nEsc ) - rOutput << "{\\*\\updnprop" << ByteString::CreateFromInt32( nProp100 ).GetBuffer() << '}'; + { + rOutput << "{\\*\\updnprop" << rtl::OString::valueOf( + static_cast<sal_Int32>(nProp100)).getStr() << '}'; + } long nUpDown = nFontHeight * Abs( nEsc ) / 100; - ByteString aUpDown = ByteString::CreateFromInt32( nUpDown ); + rtl::OString aUpDown = rtl::OString::valueOf( + static_cast<sal_Int32>(nUpDown)); if ( nEsc < 0 ) - rOutput << OOO_STRING_SVTOOLS_RTF_DN << aUpDown.GetBuffer(); + rOutput << OOO_STRING_SVTOOLS_RTF_DN << aUpDown.getStr(); else if ( nEsc > 0 ) - rOutput << OOO_STRING_SVTOOLS_RTF_UP << aUpDown.GetBuffer(); + rOutput << OOO_STRING_SVTOOLS_RTF_UP << aUpDown.getStr(); } break; } |