summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sbunoobj.cxx25
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx4
-rw-r--r--chart2/source/tools/XMLRangeHelper.cxx33
-rw-r--r--codemaker/source/codemaker/global.cxx28
-rw-r--r--connectivity/source/commontools/dbtools.cxx2
-rw-r--r--connectivity/source/commontools/parameters.cxx6
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx12
-rw-r--r--connectivity/source/drivers/mozab/MDriver.cxx2
-rwxr-xr-xconnectivity/source/parse/sqlflex.l2
-rw-r--r--cppu/qa/cppumaker/test_cppumaker.cxx12
-rw-r--r--cppu/qa/test_unotype.cxx12
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx16
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx2
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx36
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx2
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx7
-rw-r--r--editeng/source/editeng/impedit2.cxx3
-rw-r--r--extensions/source/bibliography/general.cxx2
-rw-r--r--extensions/source/logging/filehandler.cxx2
-rw-r--r--extensions/source/propctrlr/pcrcommon.cxx2
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx4
-rw-r--r--extensions/source/resource/ResourceIndexAccess.cxx2
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx3
-rw-r--r--filter/source/placeware/Base64Codec.cxx32
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx2
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
-rw-r--r--fpicker/source/unx/gnome/SalGtkFilePicker.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx4
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_default.cxx2
-rw-r--r--i18npool/source/localedata/saxparser.cxx2
-rw-r--r--idl/source/prj/database.cxx2
-rw-r--r--idlc/source/idlccompile.cxx8
-rw-r--r--idlc/source/options.cxx3
-rw-r--r--package/source/manifest/Base64Codec.cxx32
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx4
-rw-r--r--pyuno/source/module/pyuno_except.cxx8
-rw-r--r--pyuno/source/module/pyuno_module.cxx16
-rw-r--r--registry/source/regimpl.cxx4
-rw-r--r--registry/tools/checksingleton.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--rsc/source/parser/rscdb.cxx2
-rw-r--r--rsc/source/parser/rscyacc.y16
-rw-r--r--rsc/source/rsc/rsc.cxx2
-rw-r--r--sal/qa/OStringBuffer/rtl_OStringBuffer.cxx177
-rw-r--r--sax/qa/cppunit/test_converter.cxx8
-rw-r--r--sax/source/tools/converter.cxx34
-rw-r--r--sax/test/saxdemo.cxx2
-rw-r--r--sc/source/core/data/cell.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx3
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/xml/xmlconti.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx9
-rw-r--r--sfx2/source/appl/sfxhelp.cxx4
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx4
-rw-r--r--sfx2/source/control/msg.cxx3
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--shell/source/unix/exec/shellexec.cxx2
-rw-r--r--stoc/source/inspect/introspection.cxx9
-rw-r--r--svtools/source/edit/texteng.cxx3
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx3
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
-rw-r--r--svx/source/fmcomp/gridcell.cxx4
-rw-r--r--sw/qa/core/swdoc-test.cxx3
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx33
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx5
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx9
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/ww8/docxexport.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx46
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx8
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx2
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx2
-rw-r--r--toolkit/source/helper/property.cxx4
-rw-r--r--toolkit/source/layout/vcl/wrapper.cxx2
-rw-r--r--tools/inc/tools/diagnose_ex.h2
-rw-r--r--tools/qa/cppunit/test_reversemap.cxx1
-rw-r--r--tools/source/fsys/tempfile.cxx2
-rw-r--r--tools/source/fsys/urlobj.cxx18
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx23
-rw-r--r--ucb/source/ucp/webdav/DAVProperties.cxx12
-rw-r--r--ucb/source/ucp/webdav/NeonHeadRequest.cxx2
-rw-r--r--ucb/source/ucp/webdav/NeonSession.cxx40
-rw-r--r--ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx4
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx3
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx1
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx1
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx1
-rw-r--r--unodevtools/source/skeletonmaker/ostringostreaminserter.hxx49
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx1
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx1
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
-rw-r--r--vcl/source/control/edit.cxx3
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx15
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx2
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx2
-rw-r--r--vcl/unx/generic/printergfx/glyphset.cxx8
-rw-r--r--vcl/unx/generic/printergfx/printerjob.cxx3
-rw-r--r--vcl/unx/generic/printergfx/psputil.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkaction.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkimage.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atktable.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx5
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.hxx2
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx2
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx2
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx4
-rw-r--r--writerfilter/source/dmapper/FontTable.cxx2
-rw-r--r--xmloff/source/core/xmluconv.cxx34
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx2
117 files changed, 579 insertions, 461 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 57ad90b177e0..b503f85a117d 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -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();
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index eb5a3358b460..68143b5766b1 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -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;
diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx
index fa8fa9fe2ad3..6c2d94ba9681 100644
--- a/chart2/source/tools/XMLRangeHelper.cxx
+++ b/chart2/source/tools/XMLRangeHelper.cxx
@@ -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();
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 7d3faa98121a..6178effc7852 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -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;
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 1d6e63fd835e..a9b16cb0c969 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -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
}
}
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 870727b23b3b..e827873e8760 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -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() );
}
}
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 40824f1444e3..2db64d365b12 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -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;
}
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index 082a2bb9331e..44052e1674c2 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -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;
}
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 85296a863381..45485fd1f370 100755
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -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;
diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx
index 850eb10a904c..141c3e2fd1d7 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -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 {
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index ee40c853b9b8..110ae204095c 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -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;
} } } }
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index e7c4574f6aef..2a6340dd5ee9 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -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;
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index e086ea5740ff..6b4ace8c1a48 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -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 ");
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index e85f60379514..ef319d65f764 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -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() )
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index f4d9aa49a440..98b9f4bbeea4 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -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())
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 596010170d20..19687ae69c5b 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -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;
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 52cbf98d4e5d..e58110e5afd8 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -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(" )");
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 952e4eab93a7..6634356468f8 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -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( );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 9c8b9c7f84a5..297b06a38720 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -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 );
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index fd3297f29b6e..7f58f155d402 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -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 ) );
}
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index c8262a50a4a3..bd570a15bf88 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -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 )
diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx
index d05808db2d91..63419de40dd7 100644
--- a/extensions/source/propctrlr/pcrcommon.cxx
+++ b/extensions/source/propctrlr/pcrcommon.cxx
@@ -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 );
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index dce1d0265fb7..1dddac44ed86 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -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
diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx
index 31a244b96a5f..523a5fd5abd3 100644
--- a/extensions/source/resource/ResourceIndexAccess.cxx
+++ b/extensions/source/resource/ResourceIndexAccess.cxx
@@ -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>
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index 2b3d6a79cf86..7f4e16139936 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -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));
}
diff --git a/filter/source/placeware/Base64Codec.cxx b/filter/source/placeware/Base64Codec.cxx
index 435b36cb9b7b..46c1ed7606d2 100644
--- a/filter/source/placeware/Base64Codec.cxx
+++ b/filter/source/placeware/Base64Codec.cxx
@@ -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;
}
}
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 6baa99a5e672..a26642f51a33 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -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();
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index e961bf6abf79..da3682e2dcab 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -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;
}
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index 3669681c2f7f..9b5051afb9af 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -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
}
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 0c18c9c9302c..94753c26b7f0 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -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;
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 7a024633fa6e..a082b026f0ad 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -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
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 6d6ceb6e1aee..ec29d86fe635 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -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();
}
diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx
index 989e7deba0de..81caef980bed 100644
--- a/i18npool/source/localedata/saxparser.cxx
+++ b/i18npool/source/localedata/saxparser.cxx
@@ -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;
}
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index b97fcd0a9939..d488023c42f9 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -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;
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 5f4ff7bf9f64..281d2b2f099e 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -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());
diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx
index a56852dc778e..407f85e4cc4e 100644
--- a/idlc/source/options.cxx
+++ b/idlc/source/options.cxx
@@ -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();
}
diff --git a/package/source/manifest/Base64Codec.cxx b/package/source/manifest/Base64Codec.cxx
index b4f5b6d32ffd..189bdb35d2b3 100644
--- a/package/source/manifest/Base64Codec.cxx
+++ b/package/source/manifest/Base64Codec.cxx
@@ -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;
}
}
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index f7a909fbd0fc..f1dcf06218ef 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -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) );
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 97b876fbcc31..f36cb0ab13ae 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -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() );
}
}
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index a126152ef8c0..07659aabc51f 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -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 )
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 987b679132cc..fd1bb90cf2ec 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -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
diff --git a/registry/tools/checksingleton.cxx b/registry/tools/checksingleton.cxx
index e1995d6fdfd1..406af9dfeb84 100644
--- a/registry/tools/checksingleton.cxx
+++ b/registry/tools/checksingleton.cxx
@@ -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':
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index f402224077ef..e04093115a46 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -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() );
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 3368c1fb54f8..38b4d1e91fb0 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -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() )
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index 7a7bb327871c..b48537a7529c 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -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 );
};
}
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 649c96b62210..24fac69a4a87 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -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() );
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index fa377ac9fd07..581e5e27b754 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -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())
);
}
diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx
index e03dead832dd..923c7eb2413e 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -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));
}
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index efa9f1687d7f..7ce607ea47c3 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -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;
}
}
diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx
index 5e1051297d8c..f8ac35c491a8 100644
--- a/sax/test/saxdemo.cxx
+++ b/sax/test/saxdemo.cxx
@@ -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;
}
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index a3e53ddd9589..0a4bd3c267a4 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -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 )
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index c7d7d9b1d92c..1a484ef65bf4 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -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));
}
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 15aaee4d5317..bcfd95aaf200 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -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()
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index b83affe01ad6..c93748926853 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -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 );
diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx
index 2b752f7aec83..b4ca250a70e1 100644
--- a/sc/source/filter/xml/xmlconti.cxx
+++ b/sc/source/filter/xml/xmlconti.cxx
@@ -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: */
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index a1d52140b79d..e484fcd75699 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -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;
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 1e5733a9ddb7..0e30cabcf002 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -416,7 +416,7 @@ void ScNameDlg::CalcCurTableAssign( String& aAssign, ScRangeData* pRangeData )
{
rtl::OUStringBuffer sBuffer;
pRangeData->UpdateSymbol( sBuffer, maCursorPos );
- aAssign = sBuffer;
+ aAssign = sBuffer.makeStringAndClear();
}
else
{
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 37f9785e1469..2b5b3af14772 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -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;
}
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index c69f775dbcf2..6e37c166e47c 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -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
{
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 5e70016d1ff1..a9a147ce9f56 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -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 );
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index 119b186f112b..def2a67aa651 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -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: */
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index f18c2e74d78b..7a32326ad652 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -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;
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 48ed32dad8d8..4af7c7bfff84 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -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
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 253b0f418680..889179cab375 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -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
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index 9decddde44f9..b44243e7b87d 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -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 );
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index e8d7adaf58a2..2c36f8fdfae8 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -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 );
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 2837df851b7d..3ba89176d1fc 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1622,14 +1622,14 @@ void FmGridControl::InitColumnsByModels(const Reference< ::com::sun::star::conta
// Einfuegen mu� 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;
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 5b43b6210e99..18364dbe845d 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -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)
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index 4216b0c12f17..cb120309ce54 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -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());
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx
index 66684613c7e5..9c9cd4ad7f0b 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -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();
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 308ff620f6e2..2e58fbb37fd0 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -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
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 8907a74914ab..c4e81e762f91 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -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();
}
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 4a7cd31ed9a0..ff3c73bd7f83 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -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 ) << '\"';
}
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index bac074180d0e..abe68e83de39 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -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 );
}
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 2436f13d41c3..90cf55580787 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -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 );
}
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 3eaec51f5417..8963cd368834 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -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" ); }
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 1af6069de741..32855a4131c0 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -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.
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 271220faba11..efc597d648ff 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -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();
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 4f6eeba1dd70..d75c38459e3b 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -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));
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index c5f873dc2e8c..15efd5ca4aa3 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -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();
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index 50358d779877..dc2ad1227945 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -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;
diff --git a/toolkit/source/layout/vcl/wrapper.cxx b/toolkit/source/layout/vcl/wrapper.cxx
index d78bb28dff07..9713e04b3e40 100644
--- a/toolkit/source/layout/vcl/wrapper.cxx
+++ b/toolkit/source/layout/vcl/wrapper.cxx
@@ -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 ();
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 4649bedc212f..5dd8951fd61e 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -75,7 +75,7 @@
sMessage += pContext; \
} \
sMessage += "\n"; \
- OSL_ENSURE( false, sMessage )
+ OSL_ENSURE( false, sMessage.getStr() )
#else // OSL_DEBUG_LEVEL
diff --git a/tools/qa/cppunit/test_reversemap.cxx b/tools/qa/cppunit/test_reversemap.cxx
index c2a679896ca7..689f99e589d8 100644
--- a/tools/qa/cppunit/test_reversemap.cxx
+++ b/tools/qa/cppunit/test_reversemap.cxx
@@ -41,6 +41,7 @@
#include <rtl/ustring.hxx>
#include <vector>
+#include "test/oustringostreaminserter.hxx"
#include "tools/tenccvt.hxx"
//Tests for getBestMSEncodingByChar
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index b6a4b1e2b70e..1bb00a141436 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -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;
}
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 52b90f37afac..bbf2106460de 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -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;
}
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index 45ef143e64ca..2966cfe8ab76 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -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 ||
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 0562ef0b91e1..5c4fec10364d 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -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() );
}
}
diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.cxx b/ucb/source/ucp/webdav/NeonHeadRequest.cxx
index d33ff2a517cf..71ea451a4847 100644
--- a/ucb/source/ucp/webdav/NeonHeadRequest.cxx
+++ b/ucb/source/ucp/webdav/NeonHeadRequest.cxx
@@ -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 );
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index de7f69c29358..107ca9c3dd92 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -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 );
}
diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
index 56a4ca3c8513..0c80061aa8ed 100644
--- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
@@ -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();
}
//////////////////////////////////////////////////////////////////////////
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 2074efe85ee8..d7e484e49ff6 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -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();
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index ce9f4b8d95a6..a9d21d7c7dac 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -28,6 +28,7 @@
#include "codemaker/commoncpp.hxx"
+#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletoncpp.hxx"
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 33b99676f8e1..ba8851c19d12 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -28,6 +28,7 @@
#include "codemaker/commonjava.hxx"
+#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletonjava.hxx"
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 9f49f66a8785..ae224078c184 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -28,6 +28,7 @@
#include "codemaker/commonjava.hxx"
+#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include "skeletonjava.hxx"
diff --git a/unodevtools/source/skeletonmaker/ostringostreaminserter.hxx b/unodevtools/source/skeletonmaker/ostringostreaminserter.hxx
new file mode 100644
index 000000000000..9339d1ae2a4b
--- /dev/null
+++ b/unodevtools/source/skeletonmaker/ostringostreaminserter.hxx
@@ -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: */
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 7329b793ab54..aecb39ab233c 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -32,6 +32,7 @@
#include "codemaker/commoncpp.hxx"
#include "codemaker/generatedtypeset.hxx"
+#include "ostringostreaminserter.hxx"
#include "skeletoncommon.hxx"
#include <iostream>
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index 127411060105..ddd2ab43de06 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -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"
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 33a3ca6fb8f4..d157bab79d01 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -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;
}
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index e36cdaf9a0df..cf8386903173 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -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 ) );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a56ea83d8910..0fd955af9765 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5868,32 +5868,32 @@ bool PDFWriterImpl::emitCatalog()
if( aInitPageRef.getLength() > 1 )
{
aLine.append( "/OpenAction[" );
- aLine.append( aInitPageRef );
+ aLine.append( aInitPageRef.makeStringAndClear() );
aLine.append( " /XYZ null null 0]\n" );
}
break;
case PDFWriter::FitInWindow :
aLine.append( "/OpenAction[" );
- aLine.append( aInitPageRef );
+ aLine.append( aInitPageRef.makeStringAndClear() );
aLine.append( " /Fit]\n" ); //Open fit page
break;
case PDFWriter::FitWidth :
aLine.append( "/OpenAction[" );
- aLine.append( aInitPageRef );
+ aLine.append( aInitPageRef.makeStringAndClear() );
aLine.append( " /FitH " );
aLine.append( m_nInheritedPageHeight );//Open fit width
aLine.append( "]\n" );
break;
case PDFWriter::FitVisible :
aLine.append( "/OpenAction[" );
- aLine.append( aInitPageRef );
+ aLine.append( aInitPageRef.makeStringAndClear() );
aLine.append( " /FitBH " );
aLine.append( m_nInheritedPageHeight );//Open fit visible
aLine.append( "]\n" );
break;
case PDFWriter::ActionZoom :
aLine.append( "/OpenAction[" );
- aLine.append( aInitPageRef );
+ aLine.append( aInitPageRef.makeStringAndClear() );
aLine.append( " /XYZ null null " );
if( m_aContext.Zoom >= 50 && m_aContext.Zoom <= 1600 )
aLine.append( (double)m_aContext.Zoom/100.0 );
@@ -6547,7 +6547,7 @@ bool PDFWriterImpl::emitTrailer()
if( aDocChecksum.getLength() )
{
aLine.append( "/DocChecksum /" );
- aLine.append( aDocChecksum );
+ aLine.append( aDocChecksum.makeStringAndClear() );
aLine.append( "\n" );
}
if( m_aAdditionalStreams.size() > 0 )
@@ -7254,7 +7254,8 @@ void PDFWriterImpl::drawHorizontalGlyphs(
}
aKernedLine.append( ">]TJ\n" );
aUnkernedLine.append( ">Tj\n" );
- rLine.append( bNeedKern ? aKernedLine : aUnkernedLine );
+ rLine.append(
+ (bNeedKern ? aKernedLine : aUnkernedLine).makeStringAndClear() );
// set beginning of next run
nBeginRun = aRunEnds[nRun];
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 22f109905b13..2de2993905f1 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -753,7 +753,7 @@ Atom SelectionManager::getAtom( const OUString& rString )
if( ( it = m_aStringToAtom.find( rString ) ) == m_aStringToAtom.end() )
{
static Atom nNoDisplayAtoms = 1;
- Atom aAtom = m_pDisplay ? XInternAtom( m_pDisplay, OUStringToOString( rString, RTL_TEXTENCODING_ISO_8859_1 ), False ) : nNoDisplayAtoms++;
+ Atom aAtom = m_pDisplay ? XInternAtom( m_pDisplay, OUStringToOString( rString, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), False ) : nNoDisplayAtoms++;
m_aStringToAtom[ rString ] = aAtom;
m_aAtomToString[ aAtom ] = rString;
}
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 62d6288c518f..f196cf9a2ce7 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -281,7 +281,7 @@ struct GetPPDAttribs
{
// This CUPS method is not at all thread-safe we need
// to dup the pointer to a static buffer it returns ASAP
- OString aResult = m_pFunction( m_aParameter );
+ OString aResult = m_pFunction( m_aParameter.getStr() );
MutexGuard aGuard( *m_pSyncMutex );
m_aResult = aResult;
m_aCondition.set();
diff --git a/vcl/unx/generic/printergfx/glyphset.cxx b/vcl/unx/generic/printergfx/glyphset.cxx
index 967c9f2a175f..a49e5a0e21a7 100644
--- a/vcl/unx/generic/printergfx/glyphset.cxx
+++ b/vcl/unx/generic/printergfx/glyphset.cxx
@@ -458,13 +458,13 @@ GlyphSet::PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID)
sal_Int32 nSize = 0;
nSize += psp::appendStr ("(", pEncodingVector + nSize);
- nSize += psp::appendStr (GetReencodedFontName(nGlyphSetID),
+ nSize += psp::appendStr (GetReencodedFontName(nGlyphSetID).getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (") cvn (", pEncodingVector + nSize);
nSize += psp::appendStr (maBaseName.getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (") cvn ", pEncodingVector + nSize);
- nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID),
+ nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID).getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (" psp_definefont\n",
pEncodingVector + nSize);
@@ -738,7 +738,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
nSize += psp::appendStr ("/",
pEncodingVector + nSize);
- nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID),
+ nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID).getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (" [ ",
pEncodingVector + nSize);
@@ -769,7 +769,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
std::list< OString > aName( rMgr.getAdobeNameFromUnicode((*aSortedGlyph).second) );
if( aName.begin() != aName.end() )
- nSize += psp::appendStr ( aName.front(), pEncodingVector + nSize);
+ nSize += psp::appendStr ( aName.front().getStr(), pEncodingVector + nSize);
else
nSize += psp::appendStr (".notdef", pEncodingVector + nSize );
nSize += psp::appendStr (" ", pEncodingVector + nSize);
diff --git a/vcl/unx/generic/printergfx/printerjob.cxx b/vcl/unx/generic/printergfx/printerjob.cxx
index 7ae6a28372f6..c6fa885acc4c 100644
--- a/vcl/unx/generic/printergfx/printerjob.cxx
+++ b/vcl/unx/generic/printergfx/printerjob.cxx
@@ -355,10 +355,9 @@ getLocalTime(sal_Char* pBuffer)
static bool isAscii( const rtl::OUString& rStr )
{
- const sal_Unicode* pStr = rStr;
sal_Int32 nLen = rStr.getLength();
for( sal_Int32 i = 0; i < nLen; i++ )
- if( pStr[i] > 127 )
+ if( rStr[i] > 127 )
return false;
return true;
}
diff --git a/vcl/unx/generic/printergfx/psputil.cxx b/vcl/unx/generic/printergfx/psputil.cxx
index e0f82d3fff6a..2664bac8d022 100644
--- a/vcl/unx/generic/printergfx/psputil.cxx
+++ b/vcl/unx/generic/printergfx/psputil.cxx
@@ -184,7 +184,7 @@ WritePS (osl::File* pFile, const rtl::OString &rString)
sal_uInt64 nOutLength = 0;
if (nInLength > 0 && pFile)
- pFile->write (rString, nInLength, nOutLength);
+ pFile->write (rString.getStr(), nInLength, nOutLength);
return nInLength == nOutLength;
}
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 39c51cb3b274..873a491ac148 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -54,7 +54,7 @@ getAsConst( const rtl::OString& rString )
static int nIdx = 0;
nIdx = (nIdx + 1) % nMax;
aUgly[nIdx] = rString;
- return aUgly[ nIdx ];
+ return aUgly[ nIdx ].getStr();
}
static accessibility::XAccessibleAction*
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index 04263fd72906..3e7ef0f20991 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -46,7 +46,7 @@ getAsConst( rtl::OUString rString )
static int nIdx = 0;
nIdx = (nIdx + 1) % nMax;
aUgly[nIdx] = rtl::OUStringToOString( rString, RTL_TEXTENCODING_UTF8 );
- return aUgly[ nIdx ];
+ return aUgly[ nIdx ].getStr();
}
static accessibility::XAccessibleImage*
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index dec06cd7005b..013ca3ada614 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -63,7 +63,7 @@ getAsConst( rtl::OUString rString )
static int nIdx = 0;
nIdx = (nIdx + 1) % nMax;
aUgly[nIdx] = rtl::OUStringToOString( rString, RTL_TEXTENCODING_UTF8 );
- return aUgly[ nIdx ];
+ return aUgly[ nIdx ].getStr();
}
/*****************************************************************************/
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 7ccf07b57488..46e4f03aead0 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -726,7 +726,7 @@ ensureTypeFor( uno::XInterface *pAccessible )
}
}
- GType nType = g_type_from_name( aTypeName );
+ GType nType = g_type_from_name( aTypeName.getStr() );
if( nType == G_TYPE_INVALID )
{
GTypeInfo aTypeInfo = {
@@ -736,7 +736,8 @@ ensureTypeFor( uno::XInterface *pAccessible )
0, NULL, NULL
} ;
nType = g_type_register_static( ATK_TYPE_OBJECT_WRAPPER,
- aTypeName, &aTypeInfo, (GTypeFlags)0 ) ;
+ aTypeName.getStr(), &aTypeInfo,
+ (GTypeFlags)0 ) ;
for( int j = 0; j < aTypeTableSize; j++ )
if( bTypes[j] )
diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx
index 94a8b1981688..42928ece2aa2 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.hxx
@@ -118,7 +118,7 @@ static inline gchar *
OUStringToGChar(const rtl::OUString& rString )
{
rtl::OString aUtf8 = rtl::OUStringToOString( rString, RTL_TEXTENCODING_UTF8 );
- return g_strdup( aUtf8 );
+ return g_strdup( aUtf8.getStr() );
}
#define OUStringToConstGChar( string ) rtl::OUStringToOString( string, RTL_TEXTENCODING_UTF8 ).getStr()
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index c5d12c80fb63..4cb161a303ce 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -708,7 +708,7 @@ void GtkXLib::Init()
if( aAppName.getLength() > 0 )
{
rtl::OString aPrgName = rtl::OUStringToOString(aAppName, aEnc);
- g_set_prgname(aPrgName);
+ g_set_prgname(aPrgName.getStr());
}
// init gtk/gdk
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 289ebc50a462..f0cf177a383a 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -249,7 +249,7 @@ void GtkInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
}
#if GTK_CHECK_VERSION(2,10,0)
GtkRecentManager *manager = gtk_recent_manager_get_default ();
- gtk_recent_manager_add_item (manager, sGtkURL);
+ gtk_recent_manager_add_item (manager, sGtkURL.getStr());
(void)rMimeType;
#else
static getDefaultFnc sym_gtk_recent_manager_get_default =
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index faa8a719b331..e5f84ae28781 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1814,7 +1814,7 @@ void GtkSalFrame::updateWMClass()
}
else
gtk_window_set_wmclass( GTK_WINDOW(m_pWindow),
- X11SalData::getFrameResName( m_nExtStyle ),
+ X11SalData::getFrameResName( m_nExtStyle ).getStr(),
pResClass );
}
@@ -3846,7 +3846,7 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon
if (!sAllText.getLength())
return sal_False;
rtl::OString sUTF = rtl::OUStringToOString(sAllText, RTL_TEXTENCODING_UTF8);
- rtl::OUString sCursorText(sAllText, nPosition);
+ rtl::OUString sCursorText(sAllText.copy(0, nPosition));
gtk_im_context_set_surrounding(pContext, sUTF.getStr(), sUTF.getLength(),
rtl::OUStringToOString(sCursorText, RTL_TEXTENCODING_UTF8).getLength());
return sal_True;
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index 310c99afa1c6..5d1b623dd020 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -115,7 +115,7 @@ void FontTable::lcl_attribute(Id Name, Value & val)
{
rtl::OString tmp;
sValue.convertToString( &tmp, RTL_TEXTENCODING_ASCII_US, OUSTRING_TO_OSTRING_CVTFLAGS );
- m_pImpl->pCurrentEntry->nTextEncoding = rtl_getTextEncodingFromMimeCharset( tmp );
+ m_pImpl->pCurrentEntry->nTextEncoding = rtl_getTextEncodingFromMimeCharset( tmp.getStr() );
break;
}
default:
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 26558939a515..ae4b02efb9d1 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -691,7 +691,7 @@ void SvXMLUnitConverter::convertDouble( OUStringBuffer& rBuffer,
fNumber *= fFactor;
::rtl::math::doubleToUStringBuffer( rBuffer, fNumber, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, '.', sal_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 SvXMLUnitConverter::encodeBase64(OUStringBuffer& aStrBuffer, const uno::Sequence<sal_Int8>& aPass)
@@ -1531,9 +1531,7 @@ void SvXMLUnitConverter::encodeBase64(OUStringBuffer& aStrBuffer, const uno::Seq
const sal_Int8* pBuffer = aPass.getConstArray();
while (i < nBufferLength)
{
- OUStringBuffer sBuffer;
- ThreeByteToFourByte (pBuffer, i, nBufferLength, sBuffer);
- aStrBuffer.append(sBuffer);
+ ThreeByteToFourByte (pBuffer, i, nBufferLength, aStrBuffer);
i += 3;
}
}
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index c593cab5cafa..f7b135ef561b 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -902,7 +902,7 @@ void XMLEnhancedCustomShapeContext::StartElement( const uno::Reference< xml::sax
rDepth.Value <<= fDepth;
}
}
- if ( rValue.matchIgnoreAsciiCase( rtl::OUString( aUnitStr ), nIndex ) )
+ if ( rValue.matchIgnoreAsciiCase( aUnitStr.toString(), nIndex ) )
nIndex += aUnitStr.getLength();
// skipping white spaces