diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-12 00:00:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-12 09:10:04 +0100 |
commit | 84bbf6d107c19ccea85ca02861783824b9f5d6d2 (patch) | |
tree | de5c7389050c07ebbe5078d421257d79d97a112e /editeng | |
parent | d8cb328ef20387939594f15f8b270a99d509b7a3 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdbg.cxx | 22 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 2 |
3 files changed, 18 insertions, 16 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 14c45f58cbc4..80193d018589 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -311,8 +311,8 @@ void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, continue; const SfxPoolItem& rItem = rSet.Get( nWhich, bSearchInParent ); - ByteString aDebStr = DbgOutItem( *rSet.GetPool(), rItem ); - fprintf( fp, "%s", aDebStr.GetBuffer() ); + rtl::OString aDebStr = DbgOutItem( *rSet.GetPool(), rItem ); + fprintf( fp, "%s", aDebStr.getStr() ); } } @@ -338,11 +338,11 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) { ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions().GetObject(nPortion ); - fprintf( fp, "\nParagraph %i: Length = %i, Invalid = %i\nText = '%s'", nPortion, pPPortion->GetNode()->Len(), pPPortion->IsInvalid(), ByteString( *pPPortion->GetNode(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); + fprintf( fp, "\nParagraph %i: Length = %i, Invalid = %i\nText = '%s'", nPortion, pPPortion->GetNode()->Len(), pPPortion->IsInvalid(), rtl::OUStringToOString( *pPPortion->GetNode(), RTL_TEXTENCODING_ASCII_US ).getStr() ); fprintf( fp, "\nVorlage:" ); SfxStyleSheet* pStyle = pPPortion->GetNode()->GetStyleSheet(); if ( pStyle ) - fprintf( fp, " %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); + fprintf( fp, " %s", rtl::OUStringToOString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).getStr() ); fprintf( fp, "\nParagraph attribute:" ); DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), sal_False, sal_False ); @@ -365,8 +365,8 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) bZeroAttr = sal_True; fprintf(fp, "%s => ", aCharAttribs.getStr()); - ByteString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() ); - fprintf( fp, "%s", aDebStr.GetBuffer() ); + rtl::OString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() ); + fprintf( fp, "%s", aDebStr.getStr() ); } if ( bZeroAttr ) fprintf( fp, "\nNULL-Attribute!" ); @@ -413,8 +413,8 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) { EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); - ByteString aLine( pPPortion->GetNode()->Copy(pLine->GetStart(), pLine->GetEnd() - pLine->GetStart()), RTL_TEXTENCODING_ASCII_US ); - fprintf( fp, "\nLine %i\t>%s<", nLine, aLine.GetBuffer() ); + rtl::OString aLine(rtl::OUStringToOString(pPPortion->GetNode()->Copy(pLine->GetStart(), pLine->GetEnd() - pLine->GetStart()), RTL_TEXTENCODING_ASCII_US)); + fprintf( fp, "\nLine %i\t>%s<", nLine, aLine.getStr() ); } // then the internal data ... for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) @@ -438,9 +438,9 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) SfxStyleSheetBase* pStyle = aIter.First(); while ( pStyle ) { - fprintf( fp, "\nTemplate: %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); - fprintf( fp, "\nParent: %s", ByteString( pStyle->GetParent(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); - fprintf( fp, "\nFollow: %s", ByteString( pStyle->GetFollow(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); + fprintf( fp, "\nTemplate: %s", rtl::OUStringToOString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).getStr() ); + fprintf( fp, "\nParent: %s", rtl::OUStringToOString( pStyle->GetParent(), RTL_TEXTENCODING_ASCII_US ).getStr() ); + fprintf( fp, "\nFollow: %s", rtl::OUStringToOString( pStyle->GetFollow(), RTL_TEXTENCODING_ASCII_US ).getStr() ); DbgOutItemSet( fp, pStyle->GetItemSet(), sal_False, sal_False ); fprintf( fp, "\n----------------------------------" ); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 64547e6c5cc3..97cfc74fd1e8 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -82,6 +82,7 @@ #include <editeng/unolingu.hxx> #include <linguistic/lngprops.hxx> #include <i18npool/mslangid.hxx> +#include <rtl/strbuf.hxx> #include <vcl/help.hxx> #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> #include <com/sun/star/i18n/InputSequenceCheckMode.hpp> @@ -890,9 +891,10 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() ) { bDebugPaint = !bDebugPaint; - ByteString aInfo( "DebugPaint: " ); - aInfo += bDebugPaint ? "On" : "Off"; - InfoBox( NULL, String( aInfo, RTL_TEXTENCODING_ASCII_US ) ).Execute(); + rtl::OStringBuffer aInfo(RTL_CONSTASCII_STRINGPARAM( + "DebugPaint: ")); + aInfo.append(bDebugPaint ? "On" : "Off"); + InfoBox(NULL, rtl::OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US)).Execute(); } bDone = sal_False; } @@ -2603,7 +2605,7 @@ sal_uInt32 EditEngine::RegisterClipboardFormatName() { static sal_uInt32 nFormat = 0; if ( !nFormat ) - nFormat = SotExchange::RegisterFormatName( String( RTL_CONSTASCII_USTRINGPARAM( "EditEngineFormat" ) ) ); + nFormat = SotExchange::RegisterFormatName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EditEngineFormat")) ); return nFormat; } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index d3f78ef0c3fb..80dcedc226cd 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -521,7 +521,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) rOutput.WriteNumber( nNumber ); // Name of the template ... - rOutput << " " << ByteString( pStyle->GetName(), eDestEnc ).GetBuffer(); + rOutput << " " << rtl::OUStringToOString(pStyle->GetName(), eDestEnc).getStr(); rOutput << ";}"; } rOutput << '}'; |