Kaydet (Commit) d2a1da36 authored tarafından Caolán McNamara's avatar Caolán McNamara

ByteString->rtl::OString

üst 0d122ff1
...@@ -492,50 +492,50 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) ...@@ -492,50 +492,50 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
InfoBox(0, String( RTL_CONSTASCII_USTRINGPARAM( "D:\\DEBUG.LOG !" ) ) ).Execute(); InfoBox(0, String( RTL_CONSTASCII_USTRINGPARAM( "D:\\DEBUG.LOG !" ) ) ).Execute();
} }
ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) rtl::OString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
{ {
sal_uInt16 z; sal_uInt16 z;
ByteString aDebStr( "Paragraph Length = " ); rtl::OStringBuffer aDebStr(RTL_CONSTASCII_STRINGPARAM("Paragraph Length = "));
aDebStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() ); aDebStr.append(static_cast<sal_Int32>(pPPortion->GetNode()->Len()));
aDebStr += "\nCharacter attribute:"; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nCharacter attribute:"));
for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ ) for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ )
{ {
EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z ); EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z );
aDebStr += "\n "; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\n "));
aDebStr += ByteString::CreateFromInt32( pAttr->GetItem()->Which() ); aDebStr.append(static_cast<sal_Int32>(pAttr->GetItem()->Which()));
aDebStr += '\t'; aDebStr.append('\t');
aDebStr += ByteString::CreateFromInt32( pAttr->GetStart() ); aDebStr.append(static_cast<sal_Int32>(pAttr->GetStart()));
aDebStr += '\t'; aDebStr.append('\t');
aDebStr += ByteString::CreateFromInt32( pAttr->GetEnd() ); aDebStr.append(static_cast<sal_Int32>(pAttr->GetEnd()));
} }
aDebStr += "\nText portions:"; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nText portions:"));
sal_uInt16 n = 0; sal_uInt16 n = 0;
for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ ) for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ )
{ {
TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z ); TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
aDebStr += " "; aDebStr.append(' ');
aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() ); aDebStr.append(static_cast<sal_Int32>(pPortion->GetLen()));
aDebStr += "("; aDebStr.append('(');
aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() ); aDebStr.append(static_cast<sal_Int32>(pPortion->GetSize().Width()));
aDebStr += ")"; aDebStr.append(')');
aDebStr += ";"; aDebStr.append(';');
n = n + pPortion->GetLen(); n = n + pPortion->GetLen();
} }
aDebStr += "\nTotal length: "; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nTotal length: "));
aDebStr += ByteString::CreateFromInt32( n ); aDebStr.append(static_cast<sal_Int32>(n));
aDebStr += "\nSorted after Start:"; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nSorted after Start:"));
for ( sal_uInt16 x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ ) for ( sal_uInt16 x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ )
{ {
EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x ); EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x );
aDebStr += "\nStart: "; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nStart: "));
aDebStr += ByteString::CreateFromInt32( pCurAttrib->GetStart() ); aDebStr.append(static_cast<sal_Int32>(pCurAttrib->GetStart()));
aDebStr += "\tEnd: "; aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\tEnd: "));
aDebStr += ByteString::CreateFromInt32( pCurAttrib->GetEnd() ); aDebStr.append(static_cast<sal_Int32>(pCurAttrib->GetEnd()));
} }
return aDebStr; return aDebStr.makeStringAndClear();
} }
rtl::OString EditDbg::GetTextPortionInfo(TextPortionList& rPortions) rtl::OString EditDbg::GetTextPortionInfo(TextPortionList& rPortions)
......
...@@ -49,7 +49,7 @@ class EditDbg ...@@ -49,7 +49,7 @@ class EditDbg
public: public:
static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True ); static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True );
static void ShowPortionData( ParaPortion* pPortion ); static void ShowPortionData( ParaPortion* pPortion );
static ByteString GetPortionInfo( ParaPortion* pPPortion ); static rtl::OString GetPortionInfo( ParaPortion* pPPortion );
static rtl::OString GetTextPortionInfo(TextPortionList& rPortions); static rtl::OString GetTextPortionInfo(TextPortionList& rPortions);
static ByteString GetUndoDebStr( EditUndoList* pUndoList ); static ByteString GetUndoDebStr( EditUndoList* pUndoList );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment