Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *().

This commit is contained in:
Stephan Bergmann 2011-09-27 20:21:15 +02:00
parent b6d8251eee
commit 6671fa81db
117 changed files with 579 additions and 461 deletions

View File

@ -2028,9 +2028,8 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass )
SbxVariable* pVar = pMethods->Get( i );
if( pVar )
{
::rtl::OUStringBuffer aPropStr;
if( (i % nPropsPerLine) == 0 )
aPropStr.appendAscii( "\n" );
aRet.appendAscii( "\n" );
// address the method
const Reference< XIdlMethod >& rxMethod = pUnoMethods[i];
@ -2044,10 +2043,10 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass )
eType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
}
// output the name and the type
aPropStr.append( Dbg_SbxDataType2String( eType ) );
aPropStr.appendAscii( " " );
aPropStr.append ( pVar->GetName() );
aPropStr.appendAscii( " ( " );
aRet.append( Dbg_SbxDataType2String( eType ) );
aRet.appendAscii( " " );
aRet.append ( pVar->GetName() );
aRet.appendAscii( " ( " );
// the get-method mustn't have a parameter
Sequence< Reference< XIdlClass > > aParamsSeq = rxMethod->getParameterTypes();
@ -2058,22 +2057,20 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass )
{
for( sal_uInt16 j = 0; j < nParamCount; j++ )
{
aPropStr.append ( Dbg_SbxDataType2String( unoToSbxType( pParams[ j ] ) ) );
aRet.append ( Dbg_SbxDataType2String( unoToSbxType( pParams[ j ] ) ) );
if( j < nParamCount - 1 )
aPropStr.appendAscii( ", " );
aRet.appendAscii( ", " );
}
}
else
aPropStr.appendAscii( "void" );
aRet.appendAscii( "void" );
aPropStr.appendAscii( " ) " );
aRet.appendAscii( " ) " );
if( i == nMethodCount - 1 )
aPropStr.appendAscii( "\n" );
aRet.appendAscii( "\n" );
else
aPropStr.appendAscii( "; " );
aRet.append( aPropStr );
aRet.appendAscii( "; " );
}
}
return aRet.makeStringAndClear();

View File

@ -314,7 +314,7 @@ namespace cairocanvas
rendering::FontRequest aFontRequest = mpFont->getFontRequest();
rendering::FontInfo aFontInfo = aFontRequest.FontDescription;
cairo_select_font_face( pCairo, ::rtl::OUStringToOString( aFontInfo.FamilyName, RTL_TEXTENCODING_UTF8 ), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL );
cairo_select_font_face( pCairo, ::rtl::OUStringToOString( aFontInfo.FamilyName, RTL_TEXTENCODING_UTF8 ).getStr(), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL );
cairo_set_font_size( pCairo, aFontRequest.CellSize );
}
@ -335,7 +335,7 @@ namespace cairocanvas
before we were depending on unmodified current point which I believed was preserved by save/restore */
cairo_move_to( pCairo, 0, 0 );
useFont( pCairo );
cairo_show_text( pCairo, aUTF8String );
cairo_show_text( pCairo, aUTF8String.getStr() );
cairo_restore( pCairo );
return true;

View File

@ -90,38 +90,37 @@ private:
// ----------------------------------------
OUStringBuffer lcl_getXMLStringForCell( const ::chart::XMLRangeHelper::Cell & rCell )
void lcl_getXMLStringForCell( const ::chart::XMLRangeHelper::Cell & rCell, rtl::OUStringBuffer * output )
{
::rtl::OUStringBuffer aBuffer;
OSL_ASSERT(output != 0);
if( rCell.empty())
return aBuffer;
return;
sal_Int32 nCol = rCell.nColumn;
aBuffer.append( (sal_Unicode)'.' );
output->append( (sal_Unicode)'.' );
if( ! rCell.bRelativeColumn )
aBuffer.append( (sal_Unicode)'$' );
output->append( (sal_Unicode)'$' );
// get A, B, C, ..., AA, AB, ... representation of column number
if( nCol < 26 )
aBuffer.append( (sal_Unicode)('A' + nCol) );
output->append( (sal_Unicode)('A' + nCol) );
else if( nCol < 702 )
{
aBuffer.append( (sal_Unicode)('A' + nCol / 26 - 1 ));
aBuffer.append( (sal_Unicode)('A' + nCol % 26) );
output->append( (sal_Unicode)('A' + nCol / 26 - 1 ));
output->append( (sal_Unicode)('A' + nCol % 26) );
}
else // works for nCol <= 18,278
{
aBuffer.append( (sal_Unicode)('A' + nCol / 702 - 1 ));
aBuffer.append( (sal_Unicode)('A' + (nCol % 702) / 26 ));
aBuffer.append( (sal_Unicode)('A' + nCol % 26) );
output->append( (sal_Unicode)('A' + nCol / 702 - 1 ));
output->append( (sal_Unicode)('A' + (nCol % 702) / 26 ));
output->append( (sal_Unicode)('A' + nCol % 26) );
}
// write row number as number
if( ! rCell.bRelativeRow )
aBuffer.append( (sal_Unicode)'$' );
aBuffer.append( rCell.nRow + (sal_Int32)1 );
return aBuffer;
output->append( (sal_Unicode)'$' );
output->append( rCell.nRow + (sal_Int32)1 );
}
void lcl_getSingleCellAddressFromXMLString(
@ -403,13 +402,13 @@ OUString getXMLStringFromCellRange( const CellRange & rRange )
else
aBuffer.append( rRange.aTableName );
}
aBuffer.append( lcl_getXMLStringForCell( rRange.aUpperLeft ));
lcl_getXMLStringForCell( rRange.aUpperLeft, &aBuffer );
if( ! rRange.aLowerRight.empty())
{
// we have a range (not a single cell)
aBuffer.append( sal_Unicode( ':' ));
aBuffer.append( lcl_getXMLStringForCell( rRange.aLowerRight ));
lcl_getXMLStringForCell( rRange.aLowerRight, &aBuffer );
}
return aBuffer.makeStringAndClear();

View File

@ -107,15 +107,15 @@ OString createFileNameFromType( const OString& destination,
withSeperator = sal_True;
}
OStringBuffer nameBuffer(length);
OStringBuffer fileNameBuf(length);
if (withPoint)
nameBuffer.append('.');
fileNameBuf.append('.');
else
nameBuffer.append(destination.getStr(), destination.getLength());
fileNameBuf.append(destination.getStr(), destination.getLength());
if (withSeperator)
nameBuffer.append("/", 1);
fileNameBuf.append("/", 1);
OString tmpStr(type);
if (prefix.getLength() > 0)
@ -123,10 +123,10 @@ OString createFileNameFromType( const OString& destination,
tmpStr = type.replaceAt(type.lastIndexOf('/')+1, 0, prefix);
}
nameBuffer.append(tmpStr.getStr(), tmpStr.getLength());
nameBuffer.append(postfix.getStr(), postfix.getLength());
fileNameBuf.append(tmpStr.getStr(), tmpStr.getLength());
fileNameBuf.append(postfix.getStr(), postfix.getLength());
OString fileName(nameBuffer);
OString fileName(fileNameBuf.makeStringAndClear());
sal_Char token;
#ifdef SAL_UNX
@ -137,32 +137,32 @@ OString createFileNameFromType( const OString& destination,
token = '\\';
#endif
nameBuffer = OStringBuffer(length);
OStringBuffer buffer(length);
sal_Int32 nIndex = 0;
do
{
nameBuffer.append(fileName.getToken(0, token, nIndex).getStr());
buffer.append(fileName.getToken(0, token, nIndex).getStr());
if( nIndex == -1 )
break;
if (nameBuffer.getLength() == 0 || OString(".") == nameBuffer.getStr())
if (buffer.getLength() == 0 || OString(".") == buffer.getStr())
{
nameBuffer.append(token);
buffer.append(token);
continue;
}
#if defined(SAL_UNX)
if (mkdir((char*)nameBuffer.getStr(), 0777) == -1)
if (mkdir((char*)buffer.getStr(), 0777) == -1)
#else
if (mkdir((char*)nameBuffer.getStr()) == -1)
if (mkdir((char*)buffer.getStr()) == -1)
#endif
{
if ( errno == ENOENT )
return OString();
}
nameBuffer.append(token);
buffer.append(token);
} while( nIndex != -1 );
OUString uSysFileName;

View File

@ -1069,7 +1069,7 @@ try
::rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("TransferFormComponentProperties : could not transfer the value for property \""));
sMessage += pResult->Name;
sMessage += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
OSL_FAIL(::rtl::OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US));
OSL_FAIL(::rtl::OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US).getStr());
#endif
}
}

View File

@ -623,9 +623,9 @@ namespace dbtools
}
catch( const Exception& )
{
OSL_FAIL( ::rtl::OString( "ParameterManager::fillLinkedParameters: master-detail parameter number " )
+= ::rtl::OString::valueOf( sal_Int32( *aPosition + 1 ) )
+= ::rtl::OString( " could not be filled!" ) );
OSL_FAIL( ( ::rtl::OString( "ParameterManager::fillLinkedParameters: master-detail parameter number " )
+= ::rtl::OString::valueOf( sal_Int32( *aPosition + 1 ) )
+= ::rtl::OString( " could not be filled!" ) ).getStr() );
}
}
}

View File

@ -441,9 +441,9 @@ Reference<XInterface> OPoolCollection::openNode(const ::rtl::OUString& _rPath,co
}
catch(const NoSuchElementException&)
{
OSL_FAIL(::rtl::OString("::openNode: there is no element named ")
+= ::rtl::OString(_rPath.getStr(), _rPath.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("!"));
OSL_FAIL((::rtl::OString("::openNode: there is no element named ")
+= ::rtl::OString(_rPath.getStr(), _rPath.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("!")).getStr());
}
catch(Exception&)
{
@ -471,9 +471,9 @@ Any OPoolCollection::getNodeValue(const ::rtl::OUString& _rPath,const Reference<
catch(NoSuchElementException& e)
{
OSL_UNUSED( e ); // make compiler happy
OSL_FAIL(::rtl::OString("::getNodeValue: caught a NoSuchElementException while trying to open ")
+= ::rtl::OString(e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("!"));
OSL_FAIL((::rtl::OString("::getNodeValue: caught a NoSuchElementException while trying to open ")
+= ::rtl::OString(e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("!")).getStr());
}
return aReturn;
}

View File

@ -283,7 +283,7 @@ namespace
if ( !_rFunction )
{ // did not find the symbol
OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
OSL_FAIL( ( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) ).getStr() );
osl_unloadModule( _rModule );
_rModule = NULL;
}

View File

@ -791,7 +791,7 @@ void OSQLScanner::prepareScan(const ::rtl::OUString & rNewStatement, const IPars
BEGIN(m_nRule);
m_sErrorMessage = ::rtl::OUString();
m_sStatement = ::rtl::OString(rNewStatement,rNewStatement.getLength(), RTL_TEXTENCODING_UTF8);
m_sStatement = ::rtl::OUStringToOString(rNewStatement, RTL_TEXTENCODING_UTF8);
m_nCurrentPos = 0;
m_bInternational = bInternational;
m_pContext = pContext;

View File

@ -378,6 +378,18 @@
#include <cstddef>
#include <iostream>
//TODO, copied here from test/oustringostreaminserter.hxx, make DRY again:
#include "osl/thread.h"
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, rtl::OUString const & string)
{
return stream <<
rtl::OUStringToOString(string, osl_getThreadTextEncoding()).getStr();
// best effort; potentially loses data due to conversion failures and
// embedded null characters
}
namespace {
class Test: public CppUnit::TestFixture {

View File

@ -59,6 +59,18 @@
#include "rtl/ustring.hxx"
#include "sal/types.h"
//TODO, copied here from test/oustringostreaminserter.hxx, make DRY again:
#include "osl/thread.h"
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, rtl::OUString const & string)
{
return stream <<
rtl::OUStringToOString(string, osl_getThreadTextEncoding()).getStr();
// best effort; potentially loses data due to conversion failures and
// embedded null characters
}
namespace com { namespace sun { namespace star { namespace uno {
class Any;
} } } }

View File

@ -1900,7 +1900,7 @@ SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDia
if ( pDlg )
{
pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) );
pDlg->SetHelpId( rtl::OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) );
return new AbstractInsertObjectDialog_Impl( pDlg );
}
return 0;
@ -1913,7 +1913,7 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateEditObjectDialog( Window* p
if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) )
{
pDlg = new SfxInsertFloatingFrameDialog( pParent, xObj );
pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) );
pDlg->SetHelpId( rtl::OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) );
return new VclAbstractDialog_Impl( pDlg );
}
return 0;

View File

@ -258,12 +258,12 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
sSql.append( ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) );
sSql.append(s_sSET);
sSql.append(aSqlIter->second);
sSql.append(aSqlIter->second.toString());
::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
if ( rCondition.getLength() )
{
sSql.appendAscii(" WHERE ");
sSql.append( rCondition );
sSql.append( rCondition.toString() );
}
executeUpdate(_rInsertRow ,_rOrginalRow,sSql.makeStringAndClear(),aSqlIter->first);
}
@ -332,9 +332,9 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
::rtl::OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
sSql.append(sComposedTableName);
sSql.appendAscii(" ( ");
sSql.append(aSqlIter->second);
sSql.append(aSqlIter->second.toString());
sSql.append(s_sVALUES);
sSql.append(aParameter[aSqlIter->first]);
sSql.append(aParameter[aSqlIter->first].toString());
sSql.appendAscii(" )");
::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
@ -342,11 +342,11 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
{
::rtl::OUStringBuffer sQuery;
sQuery.appendAscii("SELECT ");
sQuery.append(aSqlIter->second);
sQuery.append(aSqlIter->second.toString());
sQuery.appendAscii(" FROM ");
sQuery.append(sComposedTableName);
sQuery.appendAscii(" WHERE ");
sQuery.append(rCondition);
sQuery.append(rCondition.toString());
try
{
@ -420,7 +420,7 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne
::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
sSql.append( ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) );
sSql.appendAscii(" WHERE ");
sSql.append( rCondition );
sSql.append( rCondition.toString() );
executeDelete(_rDeleteRow,sSql.makeStringAndClear(),aSqlIter->first);
}
}
@ -696,7 +696,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
::rtl::OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
::rtl::OUStringBuffer sQuery;
sQuery.appendAscii("SELECT ");
sQuery.append(aSqlIter->second);
sQuery.append(aSqlIter->second.toString());
sQuery.appendAscii(" FROM ");
sQuery.append(sComposedTableName);
sQuery.appendAscii(" WHERE ");

View File

@ -1081,7 +1081,7 @@ namespace dbmm
)
{
Any aElement( _rxContainer->getByName( *elementName ) );
::rtl::OUString sElementName( ::rtl::OUStringBuffer( sHierarhicalBase ).append( *elementName ) );
::rtl::OUString sElementName( sHierarhicalBase + *elementName );
Reference< XNameAccess > xSubContainer( aElement, UNO_QUERY );
if ( xSubContainer.is() )

View File

@ -419,7 +419,6 @@ sal_Bool ORTFImportExport::Write()
String aName = Application::GetSettings().GetStyleSettings().GetAppFont().GetName();
aFonts = ByteString (aName,eDestEnc);
}
::rtl::OString aFormat("\\fcharset0\\fnil ");
ByteString aFontNr;
(*m_pStream) << "{\\fonttbl";
@ -428,7 +427,7 @@ sal_Bool ORTFImportExport::Write()
{
(*m_pStream) << "\\f";
m_pStream->WriteNumber(static_cast<sal_Int32>(j));
(*m_pStream) << aFormat;
(*m_pStream) << "\\fcharset0\\fnil ";
(*m_pStream) << aFonts.GetToken(j).GetBuffer();
(*m_pStream) << ';';
}
@ -445,9 +444,9 @@ sal_Bool ORTFImportExport::Write()
(*m_pStream) << ";\\red255\\green255\\blue255;\\red192\\green192\\blue192;}"
<< ODatabaseImportExport::sNewLine;
::rtl::OString aTRRH("\\trrh-270\\pard\\intbl");
::rtl::OString aFS("\\fs20\\f0\\cf0\\cb2");
::rtl::OString aCell1("\\clbrdrl\\brdrs\\brdrcf0\\clbrdrt\\brdrs\\brdrcf0\\clbrdrb\\brdrs\\brdrcf0\\clbrdrr\\brdrs\\brdrcf0\\clshdng10000\\clcfpat2\\cellx");
static char const aTRRH[] = "\\trrh-270\\pard\\intbl";
static char const aFS[] = "\\fs20\\f0\\cf0\\cb2";
static char const aCell1[] = "\\clbrdrl\\brdrs\\brdrcf0\\clbrdrt\\brdrs\\brdrcf0\\clbrdrb\\brdrs\\brdrcf0\\clbrdrr\\brdrs\\brdrcf0\\clshdng10000\\clcfpat2\\cellx";
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_TROWD << OOO_STRING_SVTOOLS_RTF_TRGAPH;
m_pStream->WriteNumber(static_cast<sal_Int32>(40));
@ -583,8 +582,8 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
m_pStream->WriteNumber(static_cast<sal_Int32>(40));
(*m_pStream) << ODatabaseImportExport::sNewLine;
static const ::rtl::OString aCell2("\\clbrdrl\\brdrs\\brdrcf2\\clbrdrt\\brdrs\\brdrcf2\\clbrdrb\\brdrs\\brdrcf2\\clbrdrr\\brdrs\\brdrcf2\\clshdng10000\\clcfpat1\\cellx");
static const ::rtl::OString aTRRH("\\trrh-270\\pard\\intbl");
static char const aCell2[] = "\\clbrdrl\\brdrs\\brdrcf2\\clbrdrt\\brdrs\\brdrcf2\\clbrdrb\\brdrs\\brdrcf2\\clbrdrr\\brdrs\\brdrcf2\\clshdng10000\\clcfpat1\\cellx";
static char const aTRRH[] = "\\trrh-270\\pard\\intbl";
for ( sal_Int32 i=1; i<=_nColumnCount; ++i )
{
@ -597,7 +596,6 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
const sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant );
const sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline );
const sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout );
static const ::rtl::OString aFS2("\\fs20\\f1\\cf0\\cb1");
::comphelper::ComponentContext aContext(m_xFactory);
Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY);
@ -607,15 +605,14 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
{
(*m_pStream) << ODatabaseImportExport::sNewLine;
(*m_pStream) << '{';
(*m_pStream) << pHorzChar[i-1];
(*m_pStream) << pHorzChar[i-1].getStr();
if ( bBold ) (*m_pStream) << OOO_STRING_SVTOOLS_RTF_B;
if ( bItalic ) (*m_pStream) << OOO_STRING_SVTOOLS_RTF_I;
if ( bUnderline ) (*m_pStream) << OOO_STRING_SVTOOLS_RTF_UL;
if ( bStrikeout ) (*m_pStream) << OOO_STRING_SVTOOLS_RTF_STRIKE;
(*m_pStream) << aFS2;
(*m_pStream) << ' ';
(*m_pStream) << "\\fs20\\f1\\cf0\\cb1 ";
try
{
@ -771,7 +768,7 @@ void OHTMLImportExport::WriteBody()
IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_style );
(*m_pStream) << sMyBegComment; OUT_LF();
(*m_pStream) << OOO_STRING_SVTOOLS_HTML_body << " { " << sFontFamily << '\"' << ::rtl::OString(m_aFont.Name,m_aFont.Name.getLength(), gsl_getSystemTextEncoding()) << '\"';
(*m_pStream) << OOO_STRING_SVTOOLS_HTML_body " { " << sFontFamily << '"' << ::rtl::OUStringToOString(m_aFont.Name, gsl_getSystemTextEncoding()).getStr() << '\"';
// TODO : think about the encoding of the font name
(*m_pStream) << "; " << sFontSize;
m_pStream->WriteNumber(static_cast<sal_Int32>(m_aFont.Height));
@ -790,10 +787,7 @@ void OHTMLImportExport::WriteBody()
::Color aColor(nColor);
HTMLOutFuncs::Out_Color( (*m_pStream), aColor );
::rtl::OString sOut( ' ' );
sOut = sOut + OOO_STRING_SVTOOLS_HTML_O_bgcolor;
sOut = sOut + "=";
(*m_pStream) << sOut;
(*m_pStream) << " " OOO_STRING_SVTOOLS_HTML_O_bgcolor "=";
HTMLOutFuncs::Out_Color( (*m_pStream), aColor );
(*m_pStream) << '>'; OUT_LF();
@ -847,14 +841,14 @@ void OHTMLImportExport::WriteTables()
aStrOut = aStrOut + "=1";
IncIndent(1);
TAG_ON( aStrOut );
TAG_ON( aStrOut.getStr() );
FontOn();
TAG_ON( OOO_STRING_SVTOOLS_HTML_caption );
TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
(*m_pStream) << ::rtl::OString(m_sName,m_sName.getLength(), gsl_getSystemTextEncoding());
(*m_pStream) << ::rtl::OUStringToOString(m_sName, gsl_getSystemTextEncoding()).getStr();
// TODO : think about the encoding of the name
TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold );
TAG_OFF( OOO_STRING_SVTOOLS_HTML_caption );
@ -1022,7 +1016,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I
}
}
TAG_ON( aStrTD );
TAG_ON( aStrTD.getStr() );
FontOn();
@ -1066,13 +1060,13 @@ void OHTMLImportExport::FontOn()
aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_face;
aStrOut = aStrOut + "=";
aStrOut = aStrOut + "\"";
aStrOut = aStrOut + ::rtl::OString(m_aFont.Name,m_aFont.Name.getLength(),gsl_getSystemTextEncoding());
aStrOut = aStrOut + ::rtl::OUStringToOString(m_aFont.Name,gsl_getSystemTextEncoding());
// TODO : think about the encoding of the font name
aStrOut = aStrOut + "\"";
aStrOut = aStrOut + " ";
aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_color;
aStrOut = aStrOut + "=";
(*m_pStream) << aStrOut;
(*m_pStream) << aStrOut.getStr();
sal_Int32 nColor = 0;
if(m_xObject.is())

View File

@ -1311,7 +1311,7 @@ namespace
aURL.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" ) );
aURL.Complete += _sModuleName;
aURL.Complete += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
aURL.Complete += ::rtl::OUString(sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8);
aURL.Complete += ::rtl::OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8);
::rtl::OUString sAnchor;
::rtl::OUString sTempURL = aURL.Complete;

View File

@ -1527,7 +1527,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
const ::rtl::OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, _xTable, ::dbtools::eInDataManipulation, false, false, true );
sSql.append( sComposedTableName );
sSql.appendAscii(" ( ");
sSql.append( sColumns );
sSql.append( sColumns.makeStringAndClear() );
sSql.appendAscii(" ) ( ");
sSql.append( m_pSourceObject->getSelectStatement());
sSql.appendAscii(" )");

View File

@ -160,7 +160,7 @@ void SAL_CALL CMimeContentType::getSym( void )
{
if ( m_nPos < m_ContentType.getLength( ) )
{
m_nxtSym = OUString( &m_ContentType[m_nPos], 1 );
m_nxtSym = m_ContentType.copy(m_nPos, 1);
++m_nPos;
return;
}
@ -329,12 +329,11 @@ OUString SAL_CALL CMimeContentType::pValue( )
getSym( );
pvalue = quotedPValue( );
if ( OUString( &pvalue[pvalue.getLength() - 1], 1 ) != OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) )
if ( pvalue[pvalue.getLength() - 1] != '"' )
throw IllegalArgumentException( );
// remove the last quote-sign
OUString qpvalue( pvalue, pvalue.getLength( ) - 1 );
pvalue = qpvalue;
pvalue = pvalue.copy(0, pvalue.getLength() - 1);
if ( !pvalue.getLength( ) )
throw IllegalArgumentException( );

View File

@ -2640,8 +2640,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel,
pOldTxt[nChgPos] == pNewTxt[nChgPos] )
++nChgPos;
xub_StrLen nChgLen = static_cast< xub_StrLen >( nNewLen - nChgPos );
String aChgText( aNewText.copy( nChgPos ), nChgLen );
String aChgText( aNewText.copy( nChgPos ) );
// select text from first pos to be changed to current pos
EditSelection aSel( EditPaM( aPaM.GetNode(), (sal_uInt16) nChgPos ), aPaM );

View File

@ -497,7 +497,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
{
::rtl::OUString sId = ::rtl::OUString::createFromAscii( INET_HID_SCHEME );
DBG_ASSERT( INetURLObject( rtl::OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
sId += ::rtl::OUString( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 );
sId += ::rtl::OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 );
xPropSet->setPropertyValue( uProp, makeAny( sId ) );
}

View File

@ -208,7 +208,7 @@ namespace logging
sMessage.append( ::rtl::OString( m_sFileURL.getStr(), m_sFileURL.getLength(), osl_getThreadTextEncoding() ) );
sMessage.append( "\nerror code: " );
sMessage.append( (sal_Int32)res );
OSL_FAIL( sMessage.makeStringAndClear() );
OSL_FAIL( sMessage.makeStringAndClear().getStr() );
}
#endif
if ( m_eFileValidity == eValid )

View File

@ -62,7 +62,7 @@ namespace pcr
::rtl::OUString HelpIdUrl::getHelpURL( const rtl::OString& sHelpId )
{
::rtl::OUStringBuffer aBuffer;
::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 );
::rtl::OUString aTmp( rtl::OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
aBuffer.appendAscii( INET_HID_SCHEME );

View File

@ -1176,7 +1176,7 @@ namespace pcr
::rtl::OString sMessage( "OPropertyBrowserController::describePropertyLine: handler did not provide a display name for '" );
sMessage += ::rtl::OString( _rProperty.Name.getStr(), _rProperty.Name.getLength(), RTL_TEXTENCODING_ASCII_US );
sMessage += ::rtl::OString( "'!" );
DBG_ASSERT( _rDescriptor.DisplayName.getLength(), sMessage );
DBG_ASSERT( _rDescriptor.DisplayName.getLength(), sMessage.getStr() );
#endif
_rDescriptor.DisplayName = _rProperty.Name;
}
@ -1257,7 +1257,7 @@ namespace pcr
::rtl::OString sMessage( "OPropertyBrowserController::UpdateUI: empty category provided for property '" );
sMessage += ::rtl::OString( property->second.Name.getStr(), property->second.Name.getLength(), osl_getThreadTextEncoding() );
sMessage += "'!";
OSL_FAIL( sMessage );
OSL_FAIL( sMessage.getStr() );
}
#endif
// finally insert this property control

View File

@ -61,7 +61,7 @@ namespace
rArgs[0] >>= sFilename;
SolarMutexGuard aGuard;
const OString sEncName(OUStringToOString(sFilename, osl_getThreadTextEncoding()));
return ::boost::shared_ptr<ResMgr>(ResMgr::CreateResMgr(sEncName));
return ::boost::shared_ptr<ResMgr>(ResMgr::CreateResMgr(sEncName.getStr()));
}
class ResourceIndexAccessBase : public cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess>

View File

@ -188,7 +188,8 @@ UpdateCheckROModel::getUpdateEntry(UpdateInfo& rInfo) const
rtl::OString aStr(RELEASE_NOTE);
for(sal_Int32 n=1; n < 6; ++n )
{
rtl::OUString aUStr = getStringValue(aStr + rtl::OString::valueOf(n));
rtl::OUString aUStr = getStringValue(
(aStr + rtl::OString::valueOf(n)).getStr());
if( aUStr.getLength() > 0 )
rInfo.ReleaseNotes.push_back(ReleaseNote((sal_Int8) n, aUStr));
}

View File

@ -84,7 +84,6 @@ void ThreeByteToFourByte (const sal_uInt8* pBuffer, const sal_Int32 nStart, cons
nLen = 3;
if (nLen == 0)
{
sBuffer.setLength(0);
return;
}
@ -111,23 +110,24 @@ void ThreeByteToFourByte (const sal_uInt8* pBuffer, const sal_Int32 nStart, cons
break;
}
sBuffer.appendAscii("====");
sal_Unicode buf[] = { '=', '=', '=', '=' };
sal_uInt8 nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0000) >> 18);
sBuffer.setCharAt(0, aBase64EncodeTable [nIndex]);
buf[0] = aBase64EncodeTable [nIndex];
nIndex = static_cast< sal_uInt8 >((nBinaer & 0x3F000) >> 12);
sBuffer.setCharAt(1, aBase64EncodeTable [nIndex]);
if (nLen == 1)
return;
nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0) >> 6);
sBuffer.setCharAt(2, aBase64EncodeTable [nIndex]);
if (nLen == 2)
return;
nIndex = static_cast< sal_uInt8 >((nBinaer & 0x3F));
sBuffer.setCharAt(3, aBase64EncodeTable [nIndex]);
buf[1] = aBase64EncodeTable [nIndex];
if (nLen > 1)
{
nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0) >> 6);
buf[2] = aBase64EncodeTable [nIndex];
if (nLen > 2)
{
nIndex = static_cast< sal_uInt8 >((nBinaer & 0x3F));
buf[3] = aBase64EncodeTable [nIndex];
}
}
sBuffer.append(buf, SAL_N_ELEMENTS(buf));
}
void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Sequence < sal_Int8 >& aPass)
@ -137,9 +137,7 @@ void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Seque
const sal_Int8* pBuffer = aPass.getConstArray();
while (i < nBufferLength)
{
rtl::OUStringBuffer sBuffer;
ThreeByteToFourByte ((const sal_uInt8*)pBuffer, i, nBufferLength, sBuffer);
aStrBuffer.append(sBuffer);
ThreeByteToFourByte ((const sal_uInt8*)pBuffer, i, nBufferLength, aStrBuffer);
i += 3;
}
}

View File

@ -198,7 +198,7 @@ namespace XSLT
{
//decode the base64 string
Sequence<sal_Int8> oledata;
SvXMLUnitConverter::decodeBase64(oledata, rtl::OUString::createFromAscii(content));
SvXMLUnitConverter::decodeBase64(oledata, rtl::OStringToOUString(content, RTL_TEXTENCODING_ASCII_US));
//create a temp stream to write data to
Reference<XStream> subStream = createTempFile();
Reference<XInputStream> xInput = subStream->getInputStream();

View File

@ -1609,7 +1609,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( String& rFormula, FormulaT
{
rtl::OUStringBuffer aBuffer;
FormulaToken* p = CreateStringFromToken( aBuffer, pTokenP, bAllowArrAdvance );
rFormula += aBuffer;
rFormula += aBuffer.makeStringAndClear();
return p;
}

View File

@ -1926,8 +1926,8 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
else
{
g_warning( "Duff filter token '%s'\n",
(const sal_Char *) rtl::OUStringToOString(
rType.getToken( 0, ';', nIndex ), RTL_TEXTENCODING_UTF8 ) );
rtl::OUStringToOString(
rType.getToken( 0, ';', nIndex ), RTL_TEXTENCODING_UTF8 ).getStr() );
}
#endif
}

View File

@ -1213,7 +1213,7 @@ void ToolbarLayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbx
uno::Reference< ui::XUIElement > xUIElement;
implts_createToolBar( aTbxResName, bNotify, xUIElement );
if ( aTitle && xUIElement.is() )
if ( aTitle.getLength() != 0 && xUIElement.is() )
{
SolarMutexGuard aGuard;

View File

@ -472,7 +472,7 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
* only for numbers up to 9999.
*/
static
OUStringBuffer gr_smallNum(sal_Unicode table[], int n)
OUString gr_smallNum(sal_Unicode table[], int n)
{
if (n > 9999)
throw IllegalArgumentException();
@ -496,7 +496,7 @@ OUStringBuffer gr_smallNum(sal_Unicode table[], int n)
sb.insert(0, LEFT_KERAIA);
}
return sb;
return sb.makeStringAndClear();
}
static

View File

@ -179,7 +179,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
if (!keyStr.getLength()) {
keyStr = LocaleData().getIndexKeysByAlgorithm(LOCALE_EN,
LocaleData().getDefaultIndexAlgorithm(LOCALE_EN));
if (!keyStr)
if (!keyStr.getLength())
throw RuntimeException();
}

View File

@ -272,7 +272,7 @@ public: // ExtendedDocumentHandler
source.sPublicId = sPublicId;
source.aInputStream = createStreamFromFile(
OUStringToOString( sSystemId , RTL_TEXTENCODING_ASCII_US) );
OUStringToOString(sSystemId, RTL_TEXTENCODING_ASCII_US).getStr() );
return source;
}

View File

@ -338,7 +338,7 @@ sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName )
{
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
"cannot read file: "));
aStr.append(aName);
aStr.append(aName.makeStringAndClear());
SetError(aStr.makeStringAndClear(), pTok);
WriteError( aTokStm );
return sal_False;

View File

@ -152,7 +152,7 @@ OString makeTempName(const OString& prefix)
#if defined(SAL_W32) || defined(SAL_UNX)
OSL_ASSERT( sizeof(tmpFilePattern) > ( strlen(tmpPath)
OSL_ASSERT( sizeof(tmpFilePattern) > ( tmpPath.getLength()
+ RTL_CONSTASCII_LENGTH(
PATH_SEPARATOR )
+ prefix.getLength()
@ -160,7 +160,7 @@ OString makeTempName(const OString& prefix)
"XXXXXX") ) );
tmpFilePattern[ sizeof(tmpFilePattern)-1 ] = '\0';
strncpy(tmpFilePattern, tmpPath, sizeof(tmpFilePattern)-1);
strncpy(tmpFilePattern, tmpPath.getStr(), sizeof(tmpFilePattern)-1);
strncat(tmpFilePattern, PATH_SEPARATOR, sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
strncat(tmpFilePattern, prefix.getStr(), sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
strncat(tmpFilePattern, "XXXXXX", sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
@ -291,7 +291,7 @@ sal_Int32 compileFile(const OString * pathname)
cppArgs.append("\"");
OString cmdFileName = makeTempName(OString("idlc_"));
FILE* pCmdFile = fopen(cmdFileName, "w");
FILE* pCmdFile = fopen(cmdFileName.getStr(), "w");
if ( !pCmdFile )
{
@ -368,7 +368,7 @@ sal_Int32 compileFile(const OString * pathname)
if ( pOptions->isValid("-E") )
{
if (unlink(preprocFile) != 0)
if (unlink(preprocFile.getStr()) != 0)
{
fprintf(stderr, "%s: Could not remove parser input file %s\n",
pOptions->getProgramName().getStr(), preprocFile.getStr());

View File

@ -229,10 +229,9 @@ bool Options::initOptions(std::vector< std::string > & rArgs) throw(IllegalArgum
sal_Int32 k = 0;
do
{
OStringBuffer token; token.append("-I\""); token.append(param.getToken(0, ';', k)); token.append("\"");
if (buffer.getLength() > 0)
buffer.append(' ');
buffer.append(token);
buffer.append("-I\""); buffer.append(param.getToken(0, ';', k)); buffer.append("\"");
} while (k != -1);
param = buffer.makeStringAndClear();
}

View File

@ -85,7 +85,6 @@ void ThreeByteToFourByte (const sal_uInt8* pBuffer, const sal_Int32 nStart, cons
nLen = 3;
if (nLen == 0)
{
sBuffer.setLength(0);
return;
}
@ -112,23 +111,24 @@ void ThreeByteToFourByte (const sal_uInt8* pBuffer, const sal_Int32 nStart, cons
break;
}
sBuffer.appendAscii("====");
sal_Unicode buf[] = { '=', '=', '=', '=' };
sal_uInt8 nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0000) >> 18);
sBuffer.setCharAt(0, aBase64EncodeTable [nIndex]);
buf[0] = aBase64EncodeTable [nIndex];
nIndex = static_cast< sal_uInt8 >((nBinaer & 0x3F000) >> 12);
sBuffer.setCharAt(1, aBase64EncodeTable [nIndex]);
if (nLen == 1)
return;
nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0) >> 6);
sBuffer.setCharAt(2, aBase64EncodeTable [nIndex]);
if (nLen == 2)
return;
nIndex = static_cast< sal_uInt8 >(nBinaer & 0x3F);
sBuffer.setCharAt(3, aBase64EncodeTable [nIndex]);
buf[1] = aBase64EncodeTable [nIndex];
if (nLen > 1)
{
nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0) >> 6);
buf[2] = aBase64EncodeTable [nIndex];
if (nLen > 2)
{
nIndex = static_cast< sal_uInt8 >(nBinaer & 0x3F);
buf[3] = aBase64EncodeTable [nIndex];
}
}
sBuffer.append(buf, SAL_N_ELEMENTS(buf));
}
void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Sequence < sal_Int8 >& aPass)
@ -138,9 +138,7 @@ void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Seque
const sal_uInt8* pBuffer = reinterpret_cast< const sal_uInt8* >( aPass.getConstArray() );
while (i < nBufferLength)
{
rtl::OUStringBuffer sBuffer;
ThreeByteToFourByte (pBuffer, i, nBufferLength, sBuffer);
aStrBuffer.append(sBuffer);
ThreeByteToFourByte (pBuffer, i, nBufferLength, aStrBuffer);
i += 3;
}
}

View File

@ -150,11 +150,11 @@ static void prependPythonPath( const OUString & pythonPathBootstrap )
OUString fileUrl;
if( nNew == -1 )
{
fileUrl = OUString( &( pythonPathBootstrap[nIndex] ) );
fileUrl = pythonPathBootstrap.copy(nIndex);
}
else
{
fileUrl = OUString( &(pythonPathBootstrap[nIndex]) , nNew - nIndex );
fileUrl = pythonPathBootstrap.copy(nIndex, nNew - nIndex);
}
OUString systemPath;
osl_getSystemPathFromFileURL( fileUrl.pData, &(systemPath.pData) );

View File

@ -69,23 +69,23 @@ void raisePyExceptionWithAny( const com::sun::star::uno::Any &anyExc )
buf.appendAscii( ")" );
PyErr_SetString(
PyExc_SystemError,
OUStringToOString(buf.makeStringAndClear(),RTL_TEXTENCODING_ASCII_US) );
OUStringToOString(buf.makeStringAndClear(),RTL_TEXTENCODING_ASCII_US).getStr() );
}
}
catch( com::sun::star::lang::IllegalArgumentException & e)
{
PyErr_SetString( PyExc_SystemError,
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US) );
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
catch( com::sun::star::script::CannotConvertException & e)
{
PyErr_SetString( PyExc_SystemError,
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US) );
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
catch( RuntimeException & e)
{
PyErr_SetString( PyExc_SystemError,
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US) );
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
}

View File

@ -694,7 +694,7 @@ static PyObject * absolutize( PyObject *, PyObject * args )
PyErr_SetString(
PyExc_OSError,
OUStringToOString(buf.makeStringAndClear(),osl_getThreadTextEncoding()));
OUStringToOString(buf.makeStringAndClear(),osl_getThreadTextEncoding()).getStr());
return 0;
}
return ustring2PyUnicode( ret ).getAcquired();
@ -722,7 +722,8 @@ static PyObject * invoke(PyObject *, PyObject *args)
OStringBuffer buf;
buf.append("uno.invoke expects a tuple as 3rd argument, got ");
buf.append(PyString_AsString(PyObject_Str(item2)));
PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear());
PyErr_SetString(
PyExc_RuntimeError, buf.makeStringAndClear().getStr());
}
}
else
@ -730,14 +731,15 @@ static PyObject * invoke(PyObject *, PyObject *args)
OStringBuffer buf;
buf.append("uno.invoke expected a string as 2nd argument, got ");
buf.append(PyString_AsString(PyObject_Str(item1)));
PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear());
PyErr_SetString(
PyExc_RuntimeError, buf.makeStringAndClear().getStr());
}
}
else
{
OStringBuffer buf;
buf.append("uno.invoke expects object, name, (arg1, arg2, ... )\n");
PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear());
PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear().getStr());
}
return ret;
}
@ -780,14 +782,16 @@ static PyObject *setCurrentContext( PyObject *, PyObject * args )
OStringBuffer buf;
buf.append( "uno.setCurrentContext expects an XComponentContext implementation, got " );
buf.append( PyString_AsString( PyObject_Str( PyTuple_GetItem( args, 0) ) ) );
PyErr_SetString( PyExc_RuntimeError, buf.makeStringAndClear() );
PyErr_SetString(
PyExc_RuntimeError, buf.makeStringAndClear().getStr() );
}
}
else
{
OStringBuffer buf;
buf.append( "uno.setCurrentContext expects exactly one argument (the current Context)\n" );
PyErr_SetString( PyExc_RuntimeError, buf.makeStringAndClear() );
PyErr_SetString(
PyExc_RuntimeError, buf.makeStringAndClear().getStr() );
}
}
catch( com::sun::star::uno::Exception & e )

View File

@ -570,7 +570,7 @@ RegError ORegistry::destroyRegistry(const OUString& regName)
systemName = regName;
OString name( OUStringToOString(systemName, osl_getThreadTextEncoding()) );
if (unlink(name) != 0)
if (unlink(name.getStr()) != 0)
{
return REG_DESTROY_REGISTRY_FAILED;
}
@ -830,7 +830,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName)
if (sFullKeyName.getLength() > 1)
sFullKeyName += keyName;
else
sFullKeyName += (keyName+1);
sFullKeyName += keyName.copy(1);
sFullPath = sFullKeyName.copy(0, keyName.lastIndexOf('/') + 1);
} else

View File

@ -121,7 +121,7 @@ bool Options_Impl::initOptions_Impl(std::vector< std::string > & rArgs)
{
return badOption("invalid", option.c_str());
}
m_typeRegName = OString((*first).c_str(), (*first).size());
m_typeRegName = *first;
break;
}
case 'o':

View File

@ -48,7 +48,7 @@ namespace rptui
::rtl::OUString HelpIdUrl::getHelpURL( const rtl::OString& sHelpId )
{
::rtl::OUStringBuffer aBuffer;
::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 );
::rtl::OUString aTmp( rtl::OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
aBuffer.appendAscii( INET_HID_SCHEME );
aBuffer.append( aTmp.getStr() );

View File

@ -115,7 +115,7 @@ static sal_uInt32 getLangIdAndShortenLocale( RscTypCont* pTypCont,
sal_uInt32 nRet = GetLangId( aL );
if( nRet == 0 )
{
pTypCont->AddLanguage( aL );
pTypCont->AddLanguage( aL.getStr() );
nRet = GetLangId( aL );
}
if( rVariant.getLength() )

View File

@ -175,7 +175,7 @@ sal_Bool DoClassHeader( RSCHEADER * pHeader, sal_Bool bMember )
}
else
pTC->pEH->Error( ERR_FALSETYPE, S.Top().pClass, aName1,
pHS->getString( pHeader->pClass->GetId() ) );
pHS->getString( pHeader->pClass->GetId() ).getStr() );
}
else
{
@ -214,7 +214,7 @@ sal_Bool DoClassHeader( RSCHEADER * pHeader, sal_Bool bMember )
{
if( ERR_CONT_INVALIDTYPE == aError )
pTC->pEH->Error( aError, S.Top().pClass, aName1,
pHS->getString( pHeader->pClass->GetId() ) );
pHS->getString( pHeader->pClass->GetId() ).getStr() );
else
pTC->pEH->Error( aError, S.Top().pClass, aName1 );
S.Top().pClass->GetElement( S.Top(), RscId(),
@ -775,7 +775,7 @@ var_header_class
else
{
pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
pHS->getString( $1 ) );
pHS->getString( $1 ).getStr() );
return( ERR_ERROR );
};
@ -804,7 +804,7 @@ var_header_class
else
{
pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
pHS->getString( $1 ) );
pHS->getString( $1 ).getStr() );
return( ERR_ERROR );
};
if( !DoClassHeader( &$6, sal_True ) )
@ -833,7 +833,7 @@ var_header_class
else
{
pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
pHS->getString( $1 ) );
pHS->getString( $1 ).getStr() );
return( ERR_ERROR );
};
if( !DoClassHeader( &$6, sal_True ) )
@ -853,7 +853,7 @@ var_header
S.Push( aInst );
else{
pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
pHS->getString( $1 ) );
pHS->getString( $1 ).getStr() );
return( ERR_ERROR );
};
}
@ -877,7 +877,7 @@ var_header
}
else{
pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
pHS->getString( $1 ) );
pHS->getString( $1 ).getStr() );
return( ERR_ERROR );
};
}
@ -902,7 +902,7 @@ var_header
}
else{
pTC->pEH->Error( ERR_NOVARIABLENAME, S.Top().pClass, RscId(),
pHS->getString( $1 ) );
pHS->getString( $1 ).getStr() );
return( ERR_ERROR );
};
}

View File

@ -840,7 +840,7 @@ ERRTYPE RscCompiler::Link()
sMsg += "temporary rc file: " + aRcTmp + "\n";
sMsg += "temporary ilst file: " + aSysListTmp + "\n";
sMsg += "ilst file: " + aSysList + "\n";
pTC->pEH->FatalError(ERR_OPENFILE, RscId(), sMsg);
pTC->pEH->FatalError(ERR_OPENFILE, RscId(), sMsg.getStr());
}
if ( NULL == (fExitFile = foutput = fopen( aRcTmp.getStr(), "wb" )) )
pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() );

View File

@ -8763,7 +8763,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 11 and return OStringBuffer[0]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8779,7 +8780,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 0 and return OStringBuffer[0]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8795,7 +8797,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -11 and return OStringBuffer[0]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8811,7 +8814,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 2147483647 and return OStringBuffer[0]+2147483647",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8827,7 +8831,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -2147483648 and return OStringBuffer[0]+(-2147483648)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8843,7 +8848,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 11 and return OStringBuffer[1]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8859,7 +8865,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 0 and return OStringBuffer[1]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8875,7 +8882,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -11 and return OStringBuffer[1]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8891,7 +8899,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 2147483647 and return OStringBuffer[1]+2147483647",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8907,7 +8916,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -2147483648 and return OStringBuffer[1]+(-2147483648)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8923,7 +8933,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 11 and return OStringBuffer[2]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8939,7 +8950,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 0 and return OUStringBuffer[2]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8955,7 +8967,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -11 and return OUStringBuffer[2]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8971,7 +8984,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 2147483647 and return OStringBuffer[2]+2147483647",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -8987,7 +9001,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -2147483648 and return OStringBuffer[2]+(-2147483648)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9003,7 +9018,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 11 and return OStringBuffer[3]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9019,7 +9035,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 0 and return OStringBuffer[3]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9035,7 +9052,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -11 and return OStringBuffer[3]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9051,7 +9069,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 2147483647 and return OStringBuffer[3]+2147483647",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9067,7 +9086,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -2147483648 and return OStringBuffer[3]+(-2147483648)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9083,7 +9103,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 11 and return OStringBuffer[4]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9099,7 +9120,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 0 and return OStringBuffer[4]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9115,7 +9137,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -11 and return OStringBuffer[4]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9131,7 +9154,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 2147483647 and return OStringBuffer[4]+2147483647",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9147,7 +9171,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -2147483648 and return OStringBuffer[4]+(-2147483648)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9163,7 +9188,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 11 and return OStringBuffer(kSInt32Max)+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9179,7 +9205,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 0 and return OStringBuffer(kSInt32Max)+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9195,7 +9222,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -11 and return OStringBuffer(kSInt32Max)+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9211,7 +9239,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 2147483647 and return OStringBuffer(kSInt32Max)+2147483647",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -9227,7 +9256,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int32 -2147483648 and return OStringBuffer(kSInt32Max)+(-2147483648)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14482,7 +14512,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 11 and return OStringBuffer[0]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14498,7 +14529,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 0 and return OStringBuffer[0]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14514,7 +14546,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -11 and return OStringBuffer[0]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14529,7 +14562,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 9223372036854775807 and return OStringBuffer[0]+9223372036854775807",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14562,7 +14596,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 11 and return OStringBuffer[1]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14578,7 +14613,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 0 and return OStringBuffer[1]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14594,7 +14630,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -11 and return OStringBuffer[1]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14609,7 +14646,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 9223372036854775807 and return OStringBuffer[1]+9223372036854775807",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14625,7 +14663,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -9223372036854775808 and return OStringBuffer[1]+(-9223372036854775808)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14641,7 +14680,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 11 and return OStringBuffer[2]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14657,7 +14697,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 0 and return OUStringBuffer[2]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14673,7 +14714,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -11 and return OUStringBuffer[2]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14688,7 +14730,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 9223372036854775807 and return OStringBuffer[2]+9223372036854775807",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14704,7 +14747,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -9223372036854775808 and return OStringBuffer[2]+(-9223372036854775808)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14720,7 +14764,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 11 and return OStringBuffer[3]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14736,7 +14781,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 0 and return OStringBuffer[3]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14752,7 +14798,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -11 and return OStringBuffer[3]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14767,7 +14814,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 9223372036854775807 and return OStringBuffer[3]+9223372036854775807",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14783,7 +14831,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -9223372036854775808 and return OStringBuffer[3]+(-9223372036854775808)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14799,7 +14848,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 11 and return OStringBuffer[4]+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14815,7 +14865,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 0 and return OStringBuffer[4]+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14831,7 +14882,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -11 and return OStringBuffer[4]+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14846,7 +14898,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 9223372036854775807 and return OStringBuffer[4]+9223372036854775807",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14862,7 +14915,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -9223372036854775808 and return OStringBuffer[4]+(-9223372036854775808)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14878,7 +14932,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 11 and return OStringBuffer(kSInt64Max)+11",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14894,7 +14949,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 0 and return OStringBuffer(kSInt64Max)+0",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14910,7 +14966,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -11 and return OStringBuffer(kSInt64Max)+(-11)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14926,7 +14983,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 9223372036854775807 and return OStringBuffer(kSInt64Max)+9223372036854775807",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}
@ -14942,7 +15000,8 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -9223372036854775808 and return OStringBuffer(kSInt64Max)+(-9223372036854775808)",
aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
(aStrBuf.toString() == expVal &&
aStrBuf.getLength() == expVal.getLength())
);
}

View File

@ -97,8 +97,8 @@ static void doTest(util::Duration const & rid, char const*const pis,
CPPUNIT_ASSERT(eqDuration(rid, od));
::rtl::OUStringBuffer buf;
Converter::convertDuration(buf, od);
OSL_TRACE(
::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8));
OSL_TRACE("%s",
::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8).getStr());
CPPUNIT_ASSERT(buf.makeStringAndClear().equalsAscii(pos));
}
@ -168,8 +168,8 @@ static void doTest(util::DateTime const & rdt, char const*const pis,
CPPUNIT_ASSERT(eqDateTime(rdt, odt));
::rtl::OUStringBuffer buf;
Converter::convertDateTime(buf, odt, true);
OSL_TRACE(
::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8));
OSL_TRACE("%s",
::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8).getStr());
CPPUNIT_ASSERT(buf.makeStringAndClear().equalsAscii(pos));
}

View File

@ -450,7 +450,7 @@ void Converter::convertDouble( OUStringBuffer& rBuffer,
fNumber *= fFactor;
::rtl::math::doubleToUStringBuffer( rBuffer, fNumber, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, '.', true);
if(bWriteUnits)
rBuffer.append(sUnit);
rBuffer.append(sUnit.makeStringAndClear());
}
}
@ -1478,7 +1478,6 @@ void ThreeByteToFourByte (const sal_Int8* pBuffer, const sal_Int32 nStart, const
nLen = 3;
if (nLen == 0)
{
sBuffer.setLength(0);
return;
}
@ -1505,23 +1504,24 @@ void ThreeByteToFourByte (const sal_Int8* pBuffer, const sal_Int32 nStart, const
break;
}
sBuffer.appendAscii("====");
sal_Unicode buf[] = { '=', '=', '=', '=' };
sal_uInt8 nIndex (static_cast<sal_uInt8>((nBinaer & 0xFC0000) >> 18));
sBuffer.setCharAt(0, aBase64EncodeTable [nIndex]);
buf[0] = aBase64EncodeTable [nIndex];
nIndex = static_cast<sal_uInt8>((nBinaer & 0x3F000) >> 12);
sBuffer.setCharAt(1, aBase64EncodeTable [nIndex]);
if (nLen == 1)
return;
nIndex = static_cast<sal_uInt8>((nBinaer & 0xFC0) >> 6);
sBuffer.setCharAt(2, aBase64EncodeTable [nIndex]);
if (nLen == 2)
return;
nIndex = static_cast<sal_uInt8>((nBinaer & 0x3F));
sBuffer.setCharAt(3, aBase64EncodeTable [nIndex]);
buf[1] = aBase64EncodeTable [nIndex];
if (nLen > 1)
{
nIndex = static_cast<sal_uInt8>((nBinaer & 0xFC0) >> 6);
buf[2] = aBase64EncodeTable [nIndex];
if (nLen > 2)
{
nIndex = static_cast<sal_uInt8>((nBinaer & 0x3F));
buf[3] = aBase64EncodeTable [nIndex];
}
}
sBuffer.append(buf, SAL_N_ELEMENTS(buf));
}
void Converter::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Sequence<sal_Int8>& aPass)
@ -1531,9 +1531,7 @@ void Converter::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Sequenc
const sal_Int8* pBuffer = aPass.getConstArray();
while (i < nBufferLength)
{
rtl::OUStringBuffer sBuffer;
ThreeByteToFourByte (pBuffer, i, nBufferLength, sBuffer);
aStrBuffer.append(sBuffer);
ThreeByteToFourByte (pBuffer, i, nBufferLength, aStrBuffer);
i += 3;
}
}

View File

@ -226,7 +226,7 @@ public: // ExtendedDocumentHandler
source.sPublicId = sPublicId;
source.aInputStream = createStreamFromFile(
OUStringToOString( sSystemId , RTL_TEXTENCODING_ASCII_US) );
OUStringToOString( sSystemId, RTL_TEXTENCODING_ASCII_US).getStr() );
return source;
}

View File

@ -1016,7 +1016,7 @@ void ScFormulaCell::GetFormula( String& rFormula, const FormulaGrammar::Grammar
{
rtl::OUStringBuffer rBuffer( rFormula );
GetFormula( rBuffer, eGrammar );
rFormula = rBuffer;
rFormula = rBuffer.makeStringAndClear();
}
void ScFormulaCell::GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows )

View File

@ -5211,7 +5211,7 @@ void ScCompiler::CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,FormulaToken
; // nothing
}
if ( aBuffer.getLength() )
rBuffer.append(aBuffer);
rBuffer.append(aBuffer.makeStringAndClear());
else
rBuffer.append(ScGlobal::GetRscString(STR_NO_NAME_REF));
}

View File

@ -508,8 +508,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
{
OUString sId = msTarget.getLength() ? rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
XclXmlUtils::ToOUString( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
msTarget,
XclXmlUtils::ToOUString( "External" ) ) : OUString();
msTarget, true ) : OUString();
rStrm.GetCurrentStream()->singleElement( XML_hyperlink,
XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
FSNS( XML_r, XML_id ), sId.getLength()

View File

@ -978,7 +978,7 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
// OOXTODO: XML_theme, index into <clrScheme/>
// OOXTODO: XML_tint, double
FSEND );
lcl_WriteValue( pStream, XML_sz, OString::valueOf( (double) (rFontData.mnHeight / 20.0) ) ); // Twips->Pt
lcl_WriteValue( pStream, XML_sz, OString::valueOf( (double) (rFontData.mnHeight / 20.0) ).getStr() ); // Twips->Pt
lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline : NULL );
lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : NULL );

View File

@ -104,7 +104,7 @@ void ScXMLContentContext::Characters( const ::rtl::OUString& rChars )
void ScXMLContentContext::EndElement()
{
sValue.append(sOUText);
sValue.append(sOUText.toString());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -4782,7 +4782,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi )
// relative Referenzen Excel-konform auf die linke Spalte anpassen:
pData->UpdateSymbol(aContent, ScAddress( nStartCol, nOutRow, nTab ));
aFormula = '=';
aFormula += aContent;
aFormula += aContent.toString();
pDoc->PutCell( nStartCol,nOutRow,nTab, new ScStringCell( aName ) );
pDoc->PutCell( nEndCol ,nOutRow,nTab, new ScStringCell( aFormula ) );
++nOutRow;

View File

@ -416,7 +416,7 @@ void ScNameDlg::CalcCurTableAssign( String& aAssign, ScRangeData* pRangeData )
{
rtl::OUStringBuffer sBuffer;
pRangeData->UpdateSymbol( sBuffer, maCursorPos );
aAssign = sBuffer;
aAssign = sBuffer.makeStringAndClear();
}
else
{

View File

@ -685,13 +685,10 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
bool isSpaces(TextElement* pTextElem)
{
rtl::OUString strSpace(32);
::rtl::OUString ouTxt2(pTextElem->Text);
for(int i=0; i< pTextElem->Text.getLength(); i++)
{
rtl::OUString strToken = ouTxt2.copy(i,1) ;
if( !strSpace.equals(strToken) )
for (sal_Int32 i = 0; i != pTextElem->Text.getLength(); ++i) {
if (pTextElem->Text[i] != ' ') {
return false;
}
}
return true;
}

View File

@ -282,7 +282,9 @@ SfxHelpOptions_Impl::SfxHelpOptions_Impl()
::rtl::OUString aCodedList;
if ( pValues[nProp] >>= aCodedList )
{
rtl::OString aTmp( aCodedList, aCodedList.getLength(), RTL_TEXTENCODING_UTF8 );
rtl::OString aTmp(
rtl::OUStringToOString(
aCodedList, RTL_TEXTENCODING_UTF8 ) );
sal_Int32 nIndex = 0;
do
{

View File

@ -160,7 +160,7 @@ static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
GtkWidget *pImage = gtk_image_new_from_pixbuf( pPixbuf );
g_object_unref( G_OBJECT( pPixbuf ) );
GtkWidget *pMenuItem = gtk_image_menu_item_new_with_label( aLabel );
GtkWidget *pMenuItem = gtk_image_menu_item_new_with_label( aLabel.getStr() );
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( pMenuItem ), pImage );
g_signal_connect_data( pMenuItem, "activate", pFnCallback, pURL,
oustring_delete, GConnectFlags(0));
@ -212,7 +212,7 @@ add_image_menu_item( GtkMenuShell *pMenuShell,
pImage = gtk_image_new_from_stock( stock_id, GTK_ICON_SIZE_MENU );
GtkWidget *pMenuItem;
pMenuItem = gtk_image_menu_item_new_with_label( aUtfLabel );
pMenuItem = gtk_image_menu_item_new_with_label( aUtfLabel.getStr() );
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( pMenuItem ), pImage );
gtk_menu_shell_append( pMenuShell, pMenuItem );

View File

@ -70,8 +70,7 @@ sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const
::rtl::OUString SfxSlot::GetCommandString() const
{
rtl::OString aCmd(GetCommand());
return rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 );
return rtl::OStringToOUString(GetCommand(), RTL_TEXTENCODING_UTF8);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1071,7 +1071,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec);
pNewSlot->fnState = SFX_STUB_PTR(SfxShell,VerbState);
pNewSlot->pType = 0; HACK(SFX_TYPE(SfxVoidItem))
pNewSlot->pName = U2S(aVerbs[n].VerbName);
pNewSlot->pName = U2S(aVerbs[n].VerbName).getStr();
pNewSlot->pLinkedSlot = 0;
pNewSlot->nArgDefCount = 0;
pNewSlot->pFirstArgDef = 0;

View File

@ -260,7 +260,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
OString cmd =
#ifdef LINUX
// avoid blocking (call it in background)
OStringBuffer().append( "( " ).append( aBuffer ).append( " ) &" ).makeStringAndClear();
OStringBuffer().append( "( " ).append( aBuffer.makeStringAndClear() ).append( " ) &" ).makeStringAndClear();
#else
aBuffer.makeStringAndClear();
#endif

View File

@ -2288,9 +2288,12 @@ IntrospectionAccessStatic_Impl* ImplIntrospection::implInspect(const Any& aToIns
}
else
{
OSL_FAIL( OString( "Introspection: Property \"" ) +
OUStringToOString( aPropName, RTL_TEXTENCODING_ASCII_US ) +
OString( "\" found more than once in PropertySet" ) );
OSL_FAIL(
(OString("Introspection: Property \"") +
OUStringToOString(
aPropName, RTL_TEXTENCODING_UTF8) +
OString("\" found more than once in PropertySet")).
getStr());
}
// Count pflegen

View File

@ -770,8 +770,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
pOldTxt[nChgPos] == pNewTxt[nChgPos] )
++nChgPos;
xub_StrLen nChgLen = static_cast< xub_StrLen >(nNewLen - nChgPos);
String aChgText( aNewText.copy( nChgPos ), nChgLen );
String aChgText( aNewText.copy( nChgPos ) );
// select text from first pos to be changed to current pos
TextSelection aSel( TextPaM( aPaM.GetPara(), (sal_uInt16) nChgPos ), aPaM );

View File

@ -221,7 +221,8 @@ namespace svt { namespace uno
static ::rtl::OUString lcl_getHelpURL( const rtl::OString& sHelpId )
{
::rtl::OUStringBuffer aBuffer;
::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 );
::rtl::OUString aTmp(
rtl::OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) );
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
aBuffer.appendAscii( INET_HID_SCHEME );

View File

@ -1622,14 +1622,14 @@ void FmGridControl::InitColumnsByModels(const Reference< ::com::sun::star::conta
// Einfuegen mu<6D> sich an den Column Positionen orientieren
sal_Int32 i;
String aName;
Any aWidth;
for (i = 0; i < xColumns->getCount(); ++i)
{
Reference< ::com::sun::star::beans::XPropertySet > xCol;
::cppu::extractInterface(xCol, xColumns->getByIndex(i));
aName = (const sal_Unicode*)::comphelper::getString(xCol->getPropertyValue(FM_PROP_LABEL));
rtl::OUString aName(
comphelper::getString(xCol->getPropertyValue(FM_PROP_LABEL)));
aWidth = xCol->getPropertyValue(FM_PROP_WIDTH);
sal_Int32 nWidth = 0;

View File

@ -1545,7 +1545,7 @@ String DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb::X
{
// Hier kann ich nicht mit einem double arbeiten, da das Feld mir keines liefern kann.
// Also einfach den Text vom ::com::sun::star::util::NumberFormatter in die richtige ::com::sun::star::form::component::Form brinden lassen.
aText = (const sal_Unicode*)_rxField->getString();
aText = _rxField->getString();
if (_rxField->wasNull())
return aText;
((FormattedField*)m_pPainter)->SetTextFormatted(aText);
@ -2964,7 +2964,7 @@ sal_Bool DbFilterField::commitControl()
{
sal_Int16 nPos = (sal_Int16)static_cast<ListBox*>(m_pWindow)->GetSelectEntryPos();
if ( ( nPos >= 0 ) && ( nPos < m_aValueList.getLength() ) )
aText = (const sal_Unicode*)m_aValueList.getConstArray()[nPos];
aText = m_aValueList.getConstArray()[nPos];
}
if (m_aText != aText)

View File

@ -313,8 +313,7 @@ getRandString()
"AAAAA BBBB CCC DD E \n"));
int s = getRand(aText.getLength());
int j = getRand(aText.getLength() - s);
const sal_Unicode *pStr = aText.getStr();
rtl::OUString aRet(pStr + s, j);
rtl::OUString aRet(aText.copy(s, j));
if (!getRand(5))
aRet += rtl::OUString(sal_Unicode('\n'));
// fprintf (stderr, "rand string '%s'\n", OUStringToOString(aRet, RTL_TEXTENCODING_UTF8).getStr());

View File

@ -90,38 +90,37 @@ private:
// ----------------------------------------
OUStringBuffer lcl_getXMLStringForCell( const /*::chart::*/XMLRangeHelper::Cell & rCell )
void lcl_getXMLStringForCell( const /*::chart::*/XMLRangeHelper::Cell & rCell, rtl::OUStringBuffer * output )
{
::rtl::OUStringBuffer aBuffer;
OSL_ASSERT(output != 0);
if( rCell.empty())
return aBuffer;
return;
sal_Int32 nCol = rCell.nColumn;
aBuffer.append( (sal_Unicode)'.' );
output->append( (sal_Unicode)'.' );
if( ! rCell.bRelativeColumn )
aBuffer.append( (sal_Unicode)'$' );
output->append( (sal_Unicode)'$' );
// get A, B, C, ..., AA, AB, ... representation of column number
if( nCol < 26 )
aBuffer.append( (sal_Unicode)('A' + nCol) );
output->append( (sal_Unicode)('A' + nCol) );
else if( nCol < 702 )
{
aBuffer.append( (sal_Unicode)('A' + nCol / 26 - 1 ));
aBuffer.append( (sal_Unicode)('A' + nCol % 26) );
output->append( (sal_Unicode)('A' + nCol / 26 - 1 ));
output->append( (sal_Unicode)('A' + nCol % 26) );
}
else // works for nCol <= 18,278
{
aBuffer.append( (sal_Unicode)('A' + nCol / 702 - 1 ));
aBuffer.append( (sal_Unicode)('A' + (nCol % 702) / 26 ));
aBuffer.append( (sal_Unicode)('A' + nCol % 26) );
output->append( (sal_Unicode)('A' + nCol / 702 - 1 ));
output->append( (sal_Unicode)('A' + (nCol % 702) / 26 ));
output->append( (sal_Unicode)('A' + nCol % 26) );
}
// write row number as number
if( ! rCell.bRelativeRow )
aBuffer.append( (sal_Unicode)'$' );
aBuffer.append( rCell.nRow + (sal_Int32)1 );
return aBuffer;
output->append( (sal_Unicode)'$' );
output->append( rCell.nRow + (sal_Int32)1 );
}
void lcl_getSingleCellAddressFromXMLString(
@ -397,13 +396,13 @@ OUString getXMLStringFromCellRange( const CellRange & rRange )
else
aBuffer.append( rRange.aTableName );
}
aBuffer.append( lcl_getXMLStringForCell( rRange.aUpperLeft ));
lcl_getXMLStringForCell( rRange.aUpperLeft, &aBuffer );
if( ! rRange.aLowerRight.empty())
{
// we have a range (not a single cell)
aBuffer.append( sal_Unicode( ':' ));
aBuffer.append( lcl_getXMLStringForCell( rRange.aLowerRight ));
lcl_getXMLStringForCell( rRange.aLowerRight, &aBuffer );
}
return aBuffer.makeStringAndClear();

View File

@ -1864,7 +1864,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
AddUnitPropertyValue(sVal, rSz.Width(), rHTMLWrt.GetCSS1Unit());
sVal.append(' ');
AddUnitPropertyValue(sVal, rSz.Height(), rHTMLWrt.GetCSS1Unit());
rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_size, sVal);
rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_size, sVal.makeStringAndClear());
}
// Die Abstand-Attribute koennen auf gwohnte Weise exportiert werden

View File

@ -1145,7 +1145,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aEndTags = rtl::OStringBuffer().
append(RTL_CONSTASCII_STRINGPARAM("</")).
append(OOO_STRING_SVTOOLS_HTML_font).
append('>').append(aEndTags);
append('>').append(aEndTags).makeStringAndClear();
}
}

View File

@ -1182,10 +1182,7 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem,
if( pLink )
{
String s( URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), *pLink));
rtl::OStringBuffer sOut;
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_background)
.append("=\"");
Strm() << sOut.makeStringAndClear();
Strm() << " " OOO_STRING_SVTOOLS_HTML_O_background "=\"";
HTMLOutFuncs::Out_String( Strm(), s, eDestEnc, &aNonConvertableCharacters ) << '\"';
}
}

View File

@ -1212,7 +1212,7 @@ bool DocxAttributeOutput::StartURL( const String& rUrl, const String& rTarget )
::rtl::OString sId = m_rExport.AddRelation(
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
osUrl, S("External") );
osUrl );
m_pHyperlinkAttrList->add( FSNS( XML_r, XML_id), sId.getStr());
}
else
@ -1987,8 +1987,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
aRelId = m_rExport.AddRelation(
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" ),
OUString( aFileName ),
S( "External" ) );
OUString( aFileName ) );
nImageType = XML_link;
}
@ -2044,12 +2043,12 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
OString y( OString::valueOf( TwipsToEMU( pos.Y())));
m_pSerializer->startElementNS( XML_wp, XML_positionH, XML_relativeFrom, relativeFromH, FSEND );
m_pSerializer->startElementNS( XML_wp, XML_posOffset, FSEND );
m_pSerializer->write( x );
m_pSerializer->write( x.getStr() );
m_pSerializer->endElementNS( XML_wp, XML_posOffset );
m_pSerializer->endElementNS( XML_wp, XML_positionH );
m_pSerializer->startElementNS( XML_wp, XML_positionV, XML_relativeFrom, relativeFromV, FSEND );
m_pSerializer->startElementNS( XML_wp, XML_posOffset, FSEND );
m_pSerializer->write( y );
m_pSerializer->write( y.getStr() );
m_pSerializer->endElementNS( XML_wp, XML_posOffset );
m_pSerializer->endElementNS( XML_wp, XML_positionV );
}

View File

@ -164,10 +164,10 @@ void DocxExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ )
m_pAttrOutput->WriteBookmarks_Impl( aStarts, aEnds );
}
::rtl::OString DocxExport::AddRelation( const OUString& rType, const OUString& rTarget, const OUString& rMode )
::rtl::OString DocxExport::AddRelation( const OUString& rType, const OUString& rTarget )
{
OUString sId = m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
rType, rTarget, rMode );
rType, rTarget, true );
return ::rtl::OUStringToOString( sId, RTL_TEXTENCODING_UTF8 );
}

View File

@ -119,7 +119,7 @@ public:
virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
/// Returns the relationd id
rtl::OString AddRelation( const rtl::OUString& rType, const rtl::OUString& rTarget, const rtl::OUString& rMode );
rtl::OString AddRelation( const rtl::OUString& rType, const rtl::OUString& rTarget );
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/ ) { /* FIXME no-op for docx, most probably should not even be in MSWordExportBase */ }
virtual void WriteChar( sal_Unicode ) { /* FIXME */ fprintf( stderr, "HACK! WriteChar() has nothing to do for docx.\n" ); }

View File

@ -350,7 +350,7 @@ void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
}
if (!m_bBufferSectionHeaders)
m_rExport.Strm() << aParagraph.makeStringAndClear();
m_rExport.Strm() << aParagraph.makeStringAndClear().getStr();
else
m_aSectionHeaders.append(aParagraph.makeStringAndClear());
}
@ -369,12 +369,12 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
// output page/section breaks
SwNodeIndex aNextIndex( rNode, 1 );
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
m_bBufferSectionBreaks = true;
// output section headers / footers
if (!m_bBufferSectionHeaders)
m_rExport.Strm() << m_aSectionHeaders.makeStringAndClear();
m_rExport.Strm() << m_aSectionHeaders.makeStringAndClear().getStr();
if ( aNextIndex.GetNode().IsTxtNode() )
{
@ -397,7 +397,7 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
aPar.append(' ');
}
if (!m_bBufferSectionHeaders)
m_rExport.Strm() << aPar.makeStringAndClear();
m_rExport.Strm() << aPar.makeStringAndClear().getStr();
else
m_aSectionHeaders.append(aPar.makeStringAndClear());
}
@ -406,7 +406,7 @@ void RtfAttributeOutput::EndParagraphProperties()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_aStyles.append(m_aStylesEnd.makeStringAndClear());
m_rExport.Strm() << m_aStyles.makeStringAndClear();
m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
}
void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData )
@ -561,7 +561,7 @@ void RtfAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
if (pStyle)
aStyle.append(pStyle->getStr());
if (!m_bBufferSectionHeaders)
m_rExport.Strm() << aStyle.makeStringAndClear();
m_rExport.Strm() << aStyle.makeStringAndClear().getStr();
else
m_aSectionHeaders.append(aStyle.makeStringAndClear());
}
@ -934,7 +934,7 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT
// Emit row properties at the start of the row as well for non-nested
// tables, to support old readers.
if ( nCurrentDepth <= 1 )
m_rExport.Strm() << m_aRowDefs.makeStringAndClear();
m_rExport.Strm() << m_aRowDefs.makeStringAndClear().getStr();
m_aRowDefs.setLength(0);
return;
}
@ -946,7 +946,7 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT
// We'll write the table definition for nested tables later
if ( nCurrentDepth > 1 )
return;
m_rExport.Strm() << m_aRowDefs.makeStringAndClear();
m_rExport.Strm() << m_aRowDefs.makeStringAndClear().getStr();
}
}
@ -1071,7 +1071,7 @@ void RtfAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '}';
m_rExport.Strm() << m_aStylesheet.makeStringAndClear();
m_rExport.Strm() << m_aStylesheet.makeStringAndClear().getStr();
m_rExport.Strm() << '}';
}
@ -1179,7 +1179,7 @@ void RtfAttributeOutput::StartSection()
m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_SECT OOO_STRING_SVTOOLS_RTF_SECTD);
if (!m_bBufferSectionBreaks)
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
}
void RtfAttributeOutput::EndSection()
@ -1301,7 +1301,7 @@ void RtfAttributeOutput::SectionType( sal_uInt8 nBreakCode )
}
m_aSectionBreaks.append(sType);
if (!m_bBufferSectionBreaks)
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
}
void RtfAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &/*rRule*/ )
@ -1399,8 +1399,8 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
}
else
{
m_rExport.Strm() << "\\'" << m_rExport.OutHex( rNumberingString.Len(), 2 );
m_rExport.Strm() << m_rExport.OutString( rNumberingString, m_rExport.eDefaultEncoding );
m_rExport.Strm() << "\\'" << m_rExport.OutHex( rNumberingString.Len(), 2 ).getStr();
m_rExport.Strm() << m_rExport.OutString( rNumberingString, m_rExport.eDefaultEncoding ).getStr();
}
m_rExport.Strm() << ";}";
@ -1421,7 +1421,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
m_rExport.OutULong(m_rExport.maFontHelper.GetId(*pFont));
}
m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.mbExportModeRTF );
m_rExport.Strm() << m_aStyles.makeStringAndClear();
m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
}
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FI;
@ -1502,13 +1502,13 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_rExport.mpParentFrame = &rFrame;
m_rExport.bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true;
m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true );
m_rExport.Strm() << m_aRunText.makeStringAndClear();
m_rExport.Strm() << m_aStyles.makeStringAndClear();
m_rExport.Strm() << m_aRunText.makeStringAndClear().getStr();
m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
m_rExport.bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false;
m_rExport.Strm() << "{" OOO_STRING_SVTOOLS_RTF_IGNORE;
m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true );
m_rExport.Strm() << m_aRunText.makeStringAndClear();
m_rExport.Strm() << m_aStyles.makeStringAndClear();
m_rExport.Strm() << m_aRunText.makeStringAndClear().getStr();
m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
m_rExport.Strm() << '}';
{
@ -2630,7 +2630,7 @@ void RtfAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGHSXN);
m_aSectionBreaks.append((sal_Int32)rSize.GetHeight());
if (!m_bBufferSectionBreaks)
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
}
}
@ -2658,7 +2658,8 @@ void RtfAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
m_aSectionBreaks.append((sal_Int32)rLRSpace.GetRight());
}
if (!m_bBufferSectionBreaks)
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
m_rExport.Strm() <<
m_aSectionBreaks.makeStringAndClear().getStr();
}
else
{
@ -2717,7 +2718,8 @@ void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
m_aSectionBreaks.append((sal_Int32)aDistances.dyaHdrBottom);
}
if (!m_bBufferSectionBreaks)
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
m_rExport.Strm() <<
m_aSectionBreaks.makeStringAndClear().getStr();
}
else
{
@ -3067,7 +3069,7 @@ void RtfAttributeOutput::FontAlternateName( const String& rName ) const
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_FALT << ' ';
m_rExport.Strm() << OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ) << '}';
m_rExport.Strm() << OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr() << '}';
}
/// Font charset.

View File

@ -291,7 +291,7 @@ void RtfExport::WriteRevTab()
const String* pAuthor = GetRedline(i);
Strm() << '{';
if (pAuthor)
Strm() << OutString(*pAuthor, eDefaultEncoding);
Strm() << OutString(*pAuthor, eDefaultEncoding).getStr();
Strm() << ";}";
}
Strm() << '}' << sNewLine;
@ -443,7 +443,7 @@ void RtfExport::WriteInfo()
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_COMMENT << " ";
OUString sProduct;
utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
Strm() << OUStringToOString( sProduct, eCurrentEncoding) << "}{" << OOO_STRING_SVTOOLS_RTF_VERN;
Strm() << OUStringToOString( sProduct, eCurrentEncoding).getStr() << "}{" << OOO_STRING_SVTOOLS_RTF_VERN;
OutULong( SUPD*10 ) << '}';
Strm() << '}';
}
@ -479,7 +479,7 @@ void RtfExport::WritePageDescTable()
break;
Strm() << OOO_STRING_SVTOOLS_RTF_PGDSCNXT;
OutULong( i ) << ' ';
Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}";
Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding).getStr() << ";}";
}
Strm() << '}' << sNewLine;
bOutPageDescs = sal_False;
@ -522,7 +522,7 @@ void RtfExport::ExportDocument_Impl()
WriteInfo();
// Default TabSize
Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear() << sNewLine;
Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr() << sNewLine;
// Page description
WritePageDescTable();

View File

@ -469,7 +469,7 @@ sal_Int32 RtfSdrExport::StartShape()
m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE);
for(std::map<OString,OString>::reverse_iterator i = m_aShapeProps.rbegin(); i != m_aShapeProps.rend(); ++i)
lcl_AppendSP(m_rAttrOutput.RunText(), (*i).first, (*i).second );
lcl_AppendSP(m_rAttrOutput.RunText(), (*i).first.getStr(), (*i).second );
lcl_AppendSP(m_rAttrOutput.RunText(), "wzDescription", RtfExport::OutString( m_pSdrObject->GetDescription(), m_rExport.eCurrentEncoding));
lcl_AppendSP(m_rAttrOutput.RunText(), "wzName", RtfExport::OutString( m_pSdrObject->GetTitle(), m_rExport.eCurrentEncoding));

View File

@ -407,7 +407,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
aCmd += pSlot->GetUnoName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractInsertObjectDialog* pDlg =
pFact->CreateInsertObjectDialog( GetWin(), rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 ), xStor, &aServerList );
pFact->CreateInsertObjectDialog( GetWin(), rtl::OStringToOUString( aCmd, RTL_TEXTENCODING_UTF8 ), xStor, &aServerList );
if ( pDlg )
{
pDlg->Execute();

View File

@ -84,9 +84,9 @@ struct ImplPropertyInfo
bDependsOnOthers = sal_False;
}
ImplPropertyInfo( const sal_Unicode* pName, sal_uInt16 nId, const ::com::sun::star::uno::Type& rType,
ImplPropertyInfo( rtl::OUString const & theName, sal_uInt16 nId, const ::com::sun::star::uno::Type& rType,
sal_Int16 nAttrs, sal_Bool bDepends = sal_False )
: aName( pName )
: aName( theName )
{
nPropId = nId;
aType = rType;

View File

@ -770,7 +770,7 @@ void MessageBox::init (OUString const& message, OUString const& yes, OUString co
else
noButton.Hide ();
}
if (help_id)
if (help_id.getLength() != 0)
SetHelpId (help_id);
else
helpButton.Hide ();

View File

@ -75,7 +75,7 @@
sMessage += pContext; \
} \
sMessage += "\n"; \
OSL_ENSURE( false, sMessage )
OSL_ENSURE( false, sMessage.getStr() )
#else // OSL_DEBUG_LEVEL

View File

@ -41,6 +41,7 @@
#include <rtl/ustring.hxx>
#include <vector>
#include "test/oustringostreaminserter.hxx"
#include "tools/tenccvt.hxx"
//Tests for getBestMSEncodingByChar

View File

@ -85,7 +85,7 @@ String ConstructTempDir_Impl( const String* pParent )
if ( aRet[i-1] == '/' )
i--;
if ( DirectoryItem::get( ::rtl::OUString( aRet, i ), aItem ) == FileBase::E_None )
if ( DirectoryItem::get( aRet.copy(0, i), aItem ) == FileBase::E_None )
aName = aRet;
}
}

View File

@ -2921,7 +2921,7 @@ bool INetURLObject::setHost(rtl::OUString const & rTheHost, bool bOctets,
{
case INET_PROT_FILE:
{
rtl::OUString sTemp(aSynHost);
rtl::OUString sTemp(aSynHost.toString());
if (sTemp.equalsIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("localhost")))
{
@ -3270,7 +3270,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
eCharset, false);
}
bool bInbox;
rtl::OUString sCompare(aTheSynPath);
rtl::OUString sCompare(aTheSynPath.toString());
if (sCompare.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/inbox")))
bInbox = true;
else if (sCompare.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/newsgroups")))
@ -3811,7 +3811,7 @@ INetURLObject::getAbbreviated(
}
else
{
if (m_aAbsURIRef)
if (m_aAbsURIRef.getLength() != 0)
{
sal_Unicode const * pSchemeBegin
= m_aAbsURIRef.getStr();
@ -3869,7 +3869,7 @@ INetURLObject::getAbbreviated(
if (pSuffixEnd != pBegin)
aResult.appendAscii(RTL_CONSTASCII_STRINGPARAM("..."));
aResult.append(aSegment);
aResult.append(aTrailer);
aResult.append(aTrailer.toString());
aResult.append(aRest);
if (rStringWidth->
queryStringWidth(aResult.makeStringAndClear())
@ -3910,7 +3910,7 @@ INetURLObject::getAbbreviated(
aResult.append(aSegment);
if (pPrefixBegin != pEnd)
aResult.appendAscii(RTL_CONSTASCII_STRINGPARAM("..."));
aResult.append(aTrailer);
aResult.append(aTrailer.toString());
aResult.append(aRest);
if (rStringWidth->
queryStringWidth(aResult.makeStringAndClear())
@ -3933,7 +3933,7 @@ INetURLObject::getAbbreviated(
{
if (pPrefixBegin != pBegin || pSuffixEnd != pEnd)
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("..."));
aBuffer.append(aTrailer);
aBuffer.append(aTrailer.toString());
}
}
if (!bSegment)
@ -3987,7 +3987,7 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
if (m_eScheme != rObject.m_eScheme)
return false;
if (m_eScheme == INET_PROT_NOT_VALID)
return (m_aAbsURIRef == rObject.m_aAbsURIRef) != false;
return m_aAbsURIRef.toString() == rObject.m_aAbsURIRef.toString();
if ((m_aScheme.compare(
rObject.m_aScheme, m_aAbsURIRef, rObject.m_aAbsURIRef)
!= 0)
@ -4160,7 +4160,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
{
case INET_PROT_FILE:
{
rtl::OUString sTemp(aSynHost);
rtl::OUString sTemp(aSynHost.toString());
if (sTemp.equalsIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("localhost")))
{
@ -4266,7 +4266,7 @@ rtl::OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism,
{
rtl::OUString aTheExtURIRef;
translateToExternal(
rtl::OUString(m_aAbsURIRef), aTheExtURIRef, eMechanism, eCharset);
m_aAbsURIRef.toString(), aTheExtURIRef, eMechanism, eCharset);
return aTheExtURIRef;
}

View File

@ -104,7 +104,7 @@ static char *
OUStringToGnome( const rtl::OUString &str )
{
rtl::OString aTempStr = rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 );
return g_strdup( (const sal_Char *) aTempStr );
return g_strdup( aTempStr.getStr() );
}
static rtl::OUString
@ -409,7 +409,7 @@ uno::Any SAL_CALL Content::execute(
aCommand.Argument >>= bDeletePhysical;
::rtl::OString aURI = getOURI();
GnomeVFSResult result = gnome_vfs_unlink ((const sal_Char *) aURI);
GnomeVFSResult result = gnome_vfs_unlink (aURI.getStr());
if (result != GNOME_VFS_OK)
cancelCommandExecution( result, xEnv, sal_True );
@ -640,7 +640,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
::rtl::OString aURI = getOURI();
gnome_vfs_get_file_info
( (const sal_Char *)aURI, fileInfo,
( aURI.getStr(), fileInfo,
GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS );
if (fileInfo->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_ACCESS) {
@ -741,7 +741,7 @@ Content::doSetFileInfo( const GnomeVFSFileInfo *newInfo,
// The simple approach:
if( setMask != GNOME_VFS_SET_FILE_INFO_NONE )
result = gnome_vfs_set_file_info // missed a const in the API there
( (const sal_Char *) aURI, (GnomeVFSFileInfo *)newInfo, setMask );
( aURI.getStr(), (GnomeVFSFileInfo *)newInfo, setMask );
if ( result == GNOME_VFS_ERROR_NOT_SUPPORTED &&
( setMask & GNOME_VFS_SET_FILE_INFO_NAME ) ) {
@ -752,7 +752,7 @@ Content::doSetFileInfo( const GnomeVFSFileInfo *newInfo,
char *newURI = OUStringToGnome( makeNewURL( newInfo->name ) );
result = gnome_vfs_move ((const sal_Char *)aURI, newURI, FALSE);
result = gnome_vfs_move (aURI.getStr(), newURI, FALSE);
g_free (newURI);
}
@ -964,7 +964,7 @@ void Content::insert(
#ifdef DEBUG
g_warning ("Make directory");
#endif
result = gnome_vfs_make_directory( (const sal_Char *) aURI, perm );
result = gnome_vfs_make_directory( aURI.getStr(), perm );
if( result != GNOME_VFS_OK )
cancelCommandExecution( result, xEnv, sal_True );
@ -988,8 +988,7 @@ void Content::insert(
result = GNOME_VFS_OK;
if ( bReplaceExisting ) {
Authentication aAuth( xEnv );
result = gnome_vfs_open( &handle, (const sal_Char *)aURI,
GNOME_VFS_OPEN_WRITE );
result = gnome_vfs_open( &handle, aURI.getStr(), GNOME_VFS_OPEN_WRITE );
}
if ( result != GNOME_VFS_OK ) {
@ -1000,7 +999,7 @@ void Content::insert(
( GNOME_VFS_PERM_GROUP_WRITE | GNOME_VFS_PERM_GROUP_READ ) );
result = gnome_vfs_create
( &handle, (const sal_Char *)aURI, GNOME_VFS_OPEN_WRITE, TRUE, perm );
( &handle, aURI.getStr(), GNOME_VFS_OPEN_WRITE, TRUE, perm );
}
if( result != GNOME_VFS_OK )
@ -1140,7 +1139,7 @@ Content::getInfo( const uno::Reference< ucb::XCommandEnvironment >& xEnv )
::rtl::OString aURI = getOURI();
Authentication aAuth( xEnv );
result = gnome_vfs_get_file_info
( (const sal_Char *)aURI, &m_info, GNOME_VFS_FILE_INFO_DEFAULT );
( aURI.getStr(), &m_info, GNOME_VFS_FILE_INFO_DEFAULT );
if (result != GNOME_VFS_OK)
gnome_vfs_file_info_clear( &m_info );
} else
@ -1459,7 +1458,7 @@ Content::createTempStream(
cancelCommandExecution( GNOME_VFS_ERROR_IO, xEnv );
result = gnome_vfs_open
( &handle, (const sal_Char *)aURI, GNOME_VFS_OPEN_READ );
( &handle, aURI.getStr(), GNOME_VFS_OPEN_READ );
if (result != GNOME_VFS_OK)
cancelCommandExecution( result, xEnv );
@ -1488,7 +1487,7 @@ Content::createInputStream(
return createTempStream( xEnv );
result = gnome_vfs_open
( &handle, (const sal_Char *)aURI,
( &handle, aURI.getStr(),
(GnomeVFSOpenMode) (GNOME_VFS_OPEN_READ | GNOME_VFS_OPEN_RANDOM ) );
if (result == GNOME_VFS_ERROR_INVALID_OPEN_MODE ||

View File

@ -59,7 +59,7 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
rName.name
= strdup( rtl::OUStringToOString(
rFullName.copy( RTL_CONSTASCII_LENGTH( "DAV:" ) ),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
"http://apache.org/dav/props/" ) ) == 0 )
@ -70,7 +70,7 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
rFullName.copy(
RTL_CONSTASCII_LENGTH(
"http://apache.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
"http://ucb.openoffice.org/dav/props/" ) ) == 0 )
@ -81,7 +81,7 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
rFullName.copy(
RTL_CONSTASCII_LENGTH(
"http://ucb.openoffice.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else if ( rFullName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(
"<prop:" ) ) == 0 )
@ -95,11 +95,11 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "<prop:" );
sal_Int32 nLen = aFullName.indexOf( ' ' ) - nStart;
rName.name = strdup( aFullName.copy( nStart, nLen ) );
rName.name = strdup( aFullName.copy( nStart, nLen ).getStr() );
nStart = aFullName.indexOf( '=', nStart + nLen ) + 2; // after ="
nLen = aFullName.getLength() - RTL_CONSTASCII_LENGTH( "\">" ) - nStart;
rName.nspace = strdup( aFullName.copy( nStart, nLen ) );
rName.nspace = strdup( aFullName.copy( nStart, nLen ).getStr() );
}
else
{
@ -107,7 +107,7 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
rName.nspace = "http://ucb.openoffice.org/dav/props/";
rName.name
= strdup( rtl::OUStringToOString( rFullName,
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
}

View File

@ -111,7 +111,7 @@ NeonHeadRequest::NeonHeadRequest( HttpSession * inSession,
"HEAD",
rtl::OUStringToOString(
inPath,
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
{
osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );

View File

@ -344,10 +344,10 @@ extern "C" int NeonSession_NeonAuth( void * inUserData,
}
strcpy( inoutUserName, // #100211# - checked
rtl::OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) );
rtl::OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ).getStr() );
strcpy( inoutPassWord, // #100211# - checked
rtl::OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ) );
rtl::OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ).getStr() );
return theRetVal;
}
@ -868,7 +868,7 @@ void NeonSession::OPTIONS( const rtl::OUString & inPath,
int theRetVal = ne_options( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
&servercaps );
HandleError( theRetVal, inPath, rEnv );
@ -895,7 +895,7 @@ void NeonSession::PROPFIND( const rtl::OUString & inPath,
int theRetVal = NE_OK;
NeonPropFindRequest theRequest( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
inDepth,
inPropNames,
ioResources,
@ -920,7 +920,7 @@ void NeonSession::PROPFIND( const rtl::OUString & inPath,
int theRetVal = NE_OK;
NeonPropFindRequest theRequest( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
inDepth,
ioResInfo,
theRetVal );
@ -1024,7 +1024,7 @@ void NeonSession::PROPPATCH( const rtl::OUString & inPath,
}
pItems[ n ].value
= strdup( rtl::OUStringToOString( aStringValue,
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
}
else
{
@ -1043,7 +1043,7 @@ void NeonSession::PROPPATCH( const rtl::OUString & inPath,
theRetVal = ne_proppatch( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
pItems );
}
@ -1098,7 +1098,7 @@ NeonSession::GET( const rtl::OUString & inPath,
NeonRequestContext aCtx( xInputStream );
int theRetVal = GET( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
NeonSession_ResponseBlockReader,
false,
&aCtx );
@ -1123,7 +1123,7 @@ void NeonSession::GET( const rtl::OUString & inPath,
NeonRequestContext aCtx( ioOutputStream );
int theRetVal = GET( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
NeonSession_ResponseBlockWriter,
false,
&aCtx );
@ -1152,7 +1152,7 @@ NeonSession::GET( const rtl::OUString & inPath,
NeonRequestContext aCtx( xInputStream, inHeaderNames, ioResource );
int theRetVal = GET( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
NeonSession_ResponseBlockReader,
true,
&aCtx );
@ -1182,7 +1182,7 @@ void NeonSession::GET( const rtl::OUString & inPath,
NeonRequestContext aCtx( ioOutputStream, inHeaderNames, ioResource );
int theRetVal = GET( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
NeonSession_ResponseBlockWriter,
true,
&aCtx );
@ -1208,7 +1208,7 @@ void NeonSession::PUT( const rtl::OUString & inPath,
int theRetVal = PUT( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
reinterpret_cast< const char * >(
aDataToSend.getConstArray() ),
aDataToSend.getLength() );
@ -1239,7 +1239,7 @@ NeonSession::POST( const rtl::OUString & inPath,
NeonRequestContext aCtx( xInputStream );
int theRetVal = POST( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
reinterpret_cast< const char * >(
aDataToSend.getConstArray() ),
NeonSession_ResponseBlockReader,
@ -1274,7 +1274,7 @@ void NeonSession::POST( const rtl::OUString & inPath,
NeonRequestContext aCtx( oOutputStream );
int theRetVal = POST( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ),
inPath, RTL_TEXTENCODING_UTF8 ).getStr(),
reinterpret_cast< const char * >(
aDataToSend.getConstArray() ),
NeonSession_ResponseBlockWriter,
@ -1298,7 +1298,7 @@ void NeonSession::MKCOL( const rtl::OUString & inPath,
int theRetVal = ne_mkcol( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ) );
inPath, RTL_TEXTENCODING_UTF8 ).getStr() );
HandleError( theRetVal, inPath, rEnv );
}
@ -1324,10 +1324,10 @@ void NeonSession::COPY( const rtl::OUString & inSourceURL,
NE_DEPTH_INFINITE,
rtl::OUStringToOString(
theSourceUri.GetPath(),
RTL_TEXTENCODING_UTF8 ),
RTL_TEXTENCODING_UTF8 ).getStr(),
rtl::OUStringToOString(
theDestinationUri.GetPath(),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
HandleError( theRetVal, inSourceURL, rEnv );
}
@ -1351,10 +1351,10 @@ void NeonSession::MOVE( const rtl::OUString & inSourceURL,
inOverWrite ? 1 : 0,
rtl::OUStringToOString(
theSourceUri.GetPath(),
RTL_TEXTENCODING_UTF8 ),
RTL_TEXTENCODING_UTF8 ).getStr(),
rtl::OUStringToOString(
theDestinationUri.GetPath(),
RTL_TEXTENCODING_UTF8 ) );
RTL_TEXTENCODING_UTF8 ).getStr() );
HandleError( theRetVal, inSourceURL, rEnv );
}
@ -1372,7 +1372,7 @@ void NeonSession::DESTROY( const rtl::OUString & inPath,
int theRetVal = ne_delete( m_pHttpSession,
rtl::OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ) );
inPath, RTL_TEXTENCODING_UTF8 ).getStr() );
HandleError( theRetVal, inPath, rEnv );
}

View File

@ -193,7 +193,7 @@ static rtl::OUString encodeValue( const rtl::OUString & rValue )
else
aResult.append( c );
}
return rtl::OUString( aResult );
return aResult.makeStringAndClear();
}
//////////////////////////////////////////////////////////////////////////
@ -304,7 +304,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue )
nPos++;
}
return rtl::OUString( aResult );
return aResult.makeStringAndClear();
}
//////////////////////////////////////////////////////////////////////////

View File

@ -28,6 +28,7 @@
#include "codemaker/commoncpp.hxx"
#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletoncpp.hxx"
@ -692,7 +693,7 @@ OString generateClassDefinition(std::ostream& o,
"css::uno::RuntimeException);\n";
OStringBuffer buffer(256);
buffer.append(parentname);
buffer.append(parentname.toString());
buffer.append("< ");
boost::unordered_set< OString, OStringHash >::const_iterator iter =
interfaces.begin();

View File

@ -28,6 +28,7 @@
#include "codemaker/commoncpp.hxx"
#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletoncpp.hxx"

View File

@ -28,6 +28,7 @@
#include "codemaker/commonjava.hxx"
#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletonjava.hxx"

View File

@ -28,6 +28,7 @@
#include "codemaker/commonjava.hxx"
#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletonjava.hxx"

View File

@ -0,0 +1,49 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* [ Copyright (C) 2011 Stephan Bergmann, Red Hat Inc. <sbergman@redhat.com>
* (initial developer) ]
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#ifndef INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_OSTRINGOSTREAMINSERTER_HXX
#define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_OSTRINGOSTREAMINSERTER_HXX
#include "sal/config.h"
#include <ostream>
#include "rtl/string.hxx"
template< typename charT, typename traits > std::basic_ostream<charT, traits> &
operator <<(
std::basic_ostream<charT, traits> & stream, rtl::OString const & string)
{
return stream << string.getStr();
// potentially loses data due to embedded null characters
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -32,6 +32,7 @@
#include "codemaker/commoncpp.hxx"
#include "codemaker/generatedtypeset.hxx"
#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include <iostream>

View File

@ -32,6 +32,7 @@
#include "rtl/ustrbuf.hxx"
#include "unodevtools/typemanager.hxx"
#include "unodevtools/options.hxx"
#include "ostringostreaminserter.hxx"
#include "skeletonjava.hxx"
#include "skeletoncpp.hxx"

View File

@ -161,7 +161,7 @@ String ConstructTempDir_Impl( const String* pParent )
if ( aRet[i-1] == '/' )
i--;
if ( DirectoryItem::get( ::rtl::OUString( aRet, i ), aItem ) == FileBase::E_None )
if ( DirectoryItem::get( aRet.copy(0, i), aItem ) == FileBase::E_None )
aName = aRet;
}
}

View File

@ -955,8 +955,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
pOldTxt[nChgPos] == pTmpTxt[nChgPos] )
++nChgPos;
xub_StrLen nChgLen = static_cast< xub_StrLen >( nTmpLen - nChgPos );
String aChgText( aTmpText.copy( nChgPos ), nChgLen );
String aChgText( aTmpText.copy( nChgPos ) );
// remove text from first pos to be changed to current pos
maText.Erase( static_cast< xub_StrLen >( nChgPos ), static_cast< xub_StrLen >( nTmpPos - nChgPos ) );

Some files were not shown because too many files have changed in this diff Show More