[Libreoffice-commits] core.git: avmedia/source basctl/source bridges/source canvas/workben codemaker/source connectivity/source connectivity/workben cppcanvas/qa cui/source dbaccess/source desktop/source drawinglayer/source editeng/qa extensions/source filter/source forms/source fpicker/source framework/source i18nlangtag/source idlc/source include/codemaker jvmfwk/source l10ntools/source linguistic/source oox/source reportdesign/source sal/qa sal/rtl sax/source sc/source sdext/source sd/source sfx2/source shell/source sot/source svl/source svtools/source svx/source sw/source test/source testtools/source toolkit/source tubes/source ucb/source unoxml/source vcl/generic vcl/source vcl/unx writerfilter/source writerperfect/source
Noel Grandin
noel at peralex.com
Thu Nov 6 03:52:11 PST 2014
avmedia/source/opengl/oglplayer.cxx | 2
basctl/source/basicide/moduldlg.cxx | 4 -
bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx | 4 -
canvas/workben/canvasdemo.cxx | 2
codemaker/source/cppumaker/cpputype.cxx | 2
connectivity/source/drivers/dbase/DTable.cxx | 2
connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 12 +--
connectivity/source/drivers/evoab2/NResultSet.cxx | 2
connectivity/source/drivers/evoab2/NResultSetMetaData.cxx | 3
connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx | 2
connectivity/source/drivers/mork/MNSINIParser.cxx | 3
connectivity/source/drivers/mork/MQueryHelper.cxx | 2
connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx | 3
connectivity/source/drivers/postgresql/pq_tools.cxx | 13 +--
connectivity/source/parse/sqlflex.l | 6 -
connectivity/source/parse/sqlnode.cxx | 6 -
connectivity/workben/iniParser/main.cxx | 3
cppcanvas/qa/extras/emfplus/emfplus.cxx | 2
cui/source/options/personalization.cxx | 2
dbaccess/source/ui/misc/UITools.cxx | 2
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 3
dbaccess/source/ui/querydesign/querycontroller.cxx | 2
desktop/source/deployment/manager/dp_activepackages.cxx | 3
desktop/source/deployment/manager/dp_manager.cxx | 3
desktop/source/deployment/registry/configuration/dp_configuration.cxx | 2
desktop/source/lib/init.cxx | 3
drawinglayer/source/dumper/XShapeDumper.cxx | 4 -
editeng/qa/lookuptree/lookuptree_test.cxx | 8 +-
extensions/source/bibliography/general.cxx | 4 -
extensions/source/config/ldap/ldapaccess.cxx | 4 -
extensions/source/plugin/aqua/macmgr.mm | 2
extensions/source/propctrlr/eventhandler.cxx | 2
extensions/source/propctrlr/pcrcommon.cxx | 2
extensions/source/update/check/download.cxx | 4 -
filter/source/svg/svgwriter.cxx | 3
filter/source/xmlfilterdetect/filterdetect.cxx | 2
forms/source/xforms/submission/submission_get.cxx | 2
fpicker/source/office/OfficeControlAccess.cxx | 2
framework/source/helper/persistentwindowstate.cxx | 5 -
framework/source/inc/pattern/window.hxx | 2
framework/source/layoutmanager/helpers.cxx | 2
i18nlangtag/source/languagetag/languagetag.cxx | 2
idlc/source/astconstant.cxx | 4 -
idlc/source/astdump.cxx | 40 ++++------
idlc/source/astenum.cxx | 4 -
idlc/source/astinterface.cxx | 12 +--
idlc/source/astoperation.cxx | 15 +--
idlc/source/aststruct.cxx | 15 +--
idlc/source/idlc.cxx | 2
idlc/source/idlccompile.cxx | 13 +--
idlc/source/idlcproduce.cxx | 6 -
idlc/source/options.cxx | 2
idlc/source/parser.y | 10 --
include/codemaker/typemanager.hxx | 2
jvmfwk/source/fwkbase.cxx | 12 ---
jvmfwk/source/libxmlutil.cxx | 2
l10ntools/source/localize.cxx | 6 -
l10ntools/source/pocheck.cxx | 8 +-
l10ntools/source/propmerge.cxx | 3
l10ntools/source/uimerge.cxx | 2
l10ntools/source/xmlparse.cxx | 4 -
linguistic/source/dicimp.cxx | 2
oox/source/drawingml/customshapepresetdata.cxx | 6 -
reportdesign/source/ui/dlg/dlgpage.cxx | 6 -
reportdesign/source/ui/inspection/DefaultInspection.cxx | 2
reportdesign/source/ui/report/DesignView.cxx | 4 -
reportdesign/source/ui/report/ReportController.cxx | 4 -
sal/qa/osl/file/osl_File.cxx | 29 +++----
sal/rtl/bootstrap.cxx | 8 --
sax/source/tools/fastattribs.cxx | 4 -
sc/source/core/opencl/openclwrapper.cxx | 6 -
sc/source/core/tool/interpr2.cxx | 2
sc/source/core/tool/interpr7.cxx | 6 -
sc/source/filter/oox/numberformatsbuffer.cxx | 2
sc/source/filter/orcus/interface.cxx | 2
sc/source/ui/miscdlgs/mtrindlg.cxx | 3
sd/source/filter/html/htmlex.cxx | 2
sd/source/filter/ppt/pptin.cxx | 2
sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 4 -
sd/source/ui/remotecontrol/BluetoothServer.cxx | 2
sd/source/ui/remotecontrol/Server.cxx | 5 -
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2
sdext/source/pdfimport/sax/emitcontext.cxx | 2
sdext/source/pdfimport/tree/style.cxx | 2
sdext/source/pdfimport/wrapper/wrapper.cxx | 10 +-
sfx2/source/appl/childwin.cxx | 2
sfx2/source/appl/sfxhelp.cxx | 6 -
sfx2/source/appl/shutdownicon.cxx | 3
sfx2/source/appl/shutdowniconunx.cxx | 3
sfx2/source/bastyp/helper.cxx | 2
sfx2/source/bastyp/mieclip.cxx | 2
sfx2/source/bastyp/sfxhtml.cxx | 2
sfx2/source/control/msg.cxx | 2
sfx2/source/dialog/basedlgs.cxx | 10 +-
sfx2/source/dialog/filedlghelper.cxx | 4 -
sfx2/source/dialog/tabdlg.cxx | 12 +--
shell/source/backends/gconfbe/gconfaccess.cxx | 8 +-
shell/source/tools/lngconvex/lngconvex.cxx | 3
sot/source/sdstor/ucbstorage.cxx | 2
svl/source/misc/lockfilecommon.cxx | 2
svtools/source/contnr/fileview.cxx | 2
svtools/source/control/ctrlbox.cxx | 3
svtools/source/control/headbar.cxx | 4 -
svtools/source/control/tabbar.cxx | 4 -
svtools/source/misc/transfer.cxx | 2
svtools/source/uno/wizard/unowizard.cxx | 3
svx/source/gallery2/galini.cxx | 3
svx/source/gallery2/galtheme.cxx | 2
svx/source/sidebar/insert/InsertPropertyPanel.cxx | 2
sw/source/filter/ww8/docxattributeoutput.cxx | 2
test/source/bootstrapfixture.cxx | 2
testtools/source/bridgetest/multi.cxx | 4 -
toolkit/source/awt/vclxwindow.cxx | 2
tubes/source/contacts.cxx | 3
ucb/source/ucp/webdav-neon/DAVProperties.cxx | 6 -
ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx | 8 --
ucb/source/ucp/webdav-neon/NeonUri.cxx | 24 ++----
ucb/source/ucp/webdav/DAVProperties.cxx | 6 -
ucb/source/ucp/webdav/SerfUri.cxx | 12 +--
unoxml/source/dom/attr.cxx | 6 -
unoxml/source/dom/characterdata.cxx | 8 +-
unoxml/source/rdf/librdf_repository.cxx | 16 +---
vcl/generic/fontmanager/fontconfig.cxx | 8 +-
vcl/generic/fontmanager/helper.cxx | 2
vcl/source/control/edit.cxx | 2
vcl/source/control/fixed.cxx | 2
vcl/source/control/fixedhyper.cxx | 2
vcl/source/control/tabctrl.cxx | 4 -
vcl/source/filter/graphicfilter.cxx | 4 -
vcl/source/gdi/impimagetree.cxx | 4 -
vcl/source/window/builder.cxx | 39 ++++-----
vcl/source/window/layout.cxx | 4 -
vcl/source/window/menu.cxx | 2
vcl/source/window/menuwindow.cxx | 2
vcl/source/window/printdlg.cxx | 2
vcl/source/window/status.cxx | 4 -
vcl/source/window/toolbox.cxx | 4 -
vcl/source/window/window.cxx | 17 ++--
vcl/source/window/window2.cxx | 10 +-
vcl/unx/generic/app/i18n_cb.cxx | 2
vcl/unx/generic/printer/jobdata.cxx | 2
vcl/unx/generic/printer/printerinfomanager.cxx | 20 ++---
vcl/unx/gtk/a11y/atktextattributes.cxx | 2
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 4 -
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 2
writerfilter/source/dmapper/BorderHandler.cxx | 2
writerfilter/source/dmapper/CellColorHandler.cxx | 8 +-
writerfilter/source/dmapper/DomainMapper.cxx | 2
writerfilter/source/dmapper/TDefTableHandler.cxx | 2
writerfilter/source/filter/RtfFilter.cxx | 4 -
writerfilter/source/rtftok/rtfsdrimport.cxx | 6 -
writerperfect/source/common/WPXSvInputStream.cxx | 8 +-
154 files changed, 345 insertions(+), 444 deletions(-)
New commits:
commit 05050cdb23de586870bf479a9df5ced06828d498
Author: Noel Grandin <noel at peralex.com>
Date: Thu Nov 6 07:45:00 2014 +0200
use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 36f5e68..74f3821 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -87,7 +87,7 @@ bool OGLPlayer::create( const OUString& rURL )
if( !rFile.filename.empty() )
{
const OUString sFilesURL =
- INetURLObject::GetAbsURL(m_sURL,OStringToOUString(OString(rFile.filename.c_str()),RTL_TEXTENCODING_UTF8));
+ INetURLObject::GetAbsURL(m_sURL, OUString::fromUtf8(OString(rFile.filename.c_str())));
if( rFile.type == GLTF_IMAGE )
{
// Load images as bitmaps
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index f1381b7..639c3a7 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -555,9 +555,7 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, sal_uInt16 nMode)
- : TabPage(pParent, rName, OUString("modules/BasicIDE/ui/") +
- OStringToOUString(rName, RTL_TEXTENCODING_UTF8).toAsciiLowerCase() +
- OUString(".ui"))
+ : TabPage(pParent, rName, "modules/BasicIDE/ui/" + OUString::fromUtf8(rName).toAsciiLowerCase() + ".ui")
{
get(m_pBasicBox, "library");
Size aSize(m_pBasicBox->LogicToPixel(Size(130, 117), MAP_APPFONT));
diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
index aa484bc..24c1c85 100644
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
@@ -182,8 +182,8 @@ void call(
} catch (std::exception & e) {
throw css::uno::RuntimeException(
"C++ code threw "
- + OStringToOUString(typeid(e).name(), RTL_TEXTENCODING_UTF8)
- + ": " + OStringToOUString(e.what(), RTL_TEXTENCODING_UTF8));
+ + OUString::fromUtf8(typeid(e).name())
+ + ": " + OUString::fromUtf8(e.what()));
} catch (...) {
throw css::uno::RuntimeException(
"C++ code threw unknown exception");
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index b8ca6b4..f114e26 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -166,7 +166,7 @@ class DemoRenderer
void drawStringAt( OString aString, double x, double y )
{
rendering::StringContext aText;
- aText.Text = OStringToOUString( aString, RTL_TEXTENCODING_UTF8 );
+ aText.Text = OUString::fromUtf8( aString );
aText.StartPosition = 0;
aText.Length = aString.getLength();
rendering::RenderState aRenderState( maRenderState );
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 5887635..25bc385 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3370,7 +3370,7 @@ static OUString failsToSupply(const OUString& name_, const OString& baseName)
return OUString(
"\n"
"#if OSL_DEBUG_LEVEL > 0\n"
- " ::rtl::OUString(\"component context fails to supply service '" + name_ + "' of type '" + OStringToOUString(baseName, RTL_TEXTENCODING_UTF8) + "'\")\n"
+ " ::rtl::OUString(\"component context fails to supply service '" + name_ + "' of type '" + OUString::fromUtf8(baseName) + "'\")\n"
"#else\n"
" ::rtl::OUString(\"service not supplied\")\n"
"#endif\n");
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 47d3472..86a2dc6 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1946,7 +1946,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, cons
aStringToSubstitutes.push_back(::std::pair<const sal_Char* , OUString >("$columnname$", aColName));
aStringToSubstitutes.push_back(::std::pair<const sal_Char* , OUString >("$precision$", OUString::number(nLen)));
aStringToSubstitutes.push_back(::std::pair<const sal_Char* , OUString >("$scale$", OUString::number(nScale)));
- aStringToSubstitutes.push_back(::std::pair<const sal_Char* , OUString >("$value$", OStringToOUString(aDefaultValue,RTL_TEXTENCODING_UTF8)));
+ aStringToSubstitutes.push_back(::std::pair<const sal_Char* , OUString >("$value$", OUString::fromUtf8(aDefaultValue)));
const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution(
STR_INVALID_COLUMN_DECIMAL_VALUE
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index c53523b..4bc4f31 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -214,8 +214,7 @@ namespace connectivity
if( pSpec )
{
- aName = OStringToOUString( g_param_spec_get_name( ( GParamSpec * )pSpec ),
- RTL_TEXTENCODING_UTF8 );
+ aName = OUString::fromUtf8( g_param_spec_get_name( ( GParamSpec * )pSpec ) );
aName = aName.replace( '-', '_' );
}
return aName;
@@ -1155,12 +1154,10 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
ODatabaseMetaDataResultSet::ORow aRow(3);
aRow.reserve(6);
- OUString aHumanName = OStringToOUString( e_source_get_display_name( pSource ),
- RTL_TEXTENCODING_UTF8 );
+ OUString aHumanName = OUString::fromUtf8( e_source_get_display_name( pSource ) );
aRow.push_back(new ORowSetValueDecorator(aHumanName)); //tablename
aRow.push_back(new ORowSetValueDecorator(aTable));
- OUString aUID = OStringToOUString( e_source_get_uid( pSource ),
- RTL_TEXTENCODING_UTF8 );
+ OUString aUID = OUString::fromUtf8( e_source_get_uid( pSource ) );
aRow.push_back(new ORowSetValueDecorator(aUID)); //comment
//I'd prefer to swap the comment and the human name and
//just use e_source_registry_ref_source(get_e_source_registry(), aUID);
@@ -1207,8 +1204,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
{
ESource *pSource = E_SOURCE (s->data);
- OUString aName = OStringToOUString( e_source_peek_name( pSource ),
- RTL_TEXTENCODING_UTF8 );
+ OUString aName = OUString::fromUtf8( e_source_peek_name( pSource ) );
ODatabaseMetaDataResultSet::ORow aRow(3);
aRow.reserve(6);
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index bbf643c..59c9cf6 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -98,7 +98,7 @@ valueToOUString( GValue& _rValue )
{
const char *pStr = g_value_get_string( &_rValue );
OString aStr( pStr ? pStr : "" );
- OUString sResult( OStringToOUString( aStr, RTL_TEXTENCODING_UTF8 ) );
+ OUString sResult( OUString::fromUtf8( aStr ) );
g_value_unset( &_rValue );
return sResult;
}
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 8e6a074..084cefd 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -110,8 +110,7 @@ OUString SAL_CALL OEvoabResultSetMetaData::getColumnLabel( sal_Int32 nColumnNum
OUString aLabel;
if( pSpec )
- aLabel = OStringToOUString( g_param_spec_get_nick( (GParamSpec *) pSpec ),
- RTL_TEXTENCODING_UTF8 );
+ aLabel = OUString::fromUtf8( g_param_spec_get_nick( (GParamSpec *) pSpec ) );
return aLabel;
}
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
index c4a239a..1367343 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
@@ -60,7 +60,7 @@ bool MDatabaseMetaDataHelper::getTableStrings( OConnection* _pCon,
std::set<std::string> lists;
_pCon->getMorkParser("AddressBook")->retrieveLists(lists);
for (::std::set<std::string>::iterator iter = lists.begin(); iter != lists.end(); ++iter) {
- OUString groupTableName = OStringToOUString((*iter).c_str(), RTL_TEXTENCODING_UTF8);
+ OUString groupTableName = OUString::fromUtf8((*iter).c_str());
SAL_INFO("connectivity.mork", "add Table " << groupTableName);
_rStrings.push_back(groupTableName);
diff --git a/connectivity/source/drivers/mork/MNSINIParser.cxx b/connectivity/source/drivers/mork/MNSINIParser.cxx
index b33baa1..ff8f932 100644
--- a/connectivity/source/drivers/mork/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mork/MNSINIParser.cxx
@@ -60,8 +60,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
struct ini_NameValue nameValue;
nameValue.sName = OStringToOUString(
line.copy(0,nIndex).trim(), RTL_TEXTENCODING_ASCII_US );
- nameValue.sValue = OStringToOUString(
- line.copy(nIndex+1).trim(), RTL_TEXTENCODING_UTF8 );
+ nameValue.sValue = OUString::fromUtf8( line.copy(nIndex+1).trim() );
aSection->lList.push_back(nameValue);
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 686af4e..1fff2cc 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -243,7 +243,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
std::string value = xMork->getValue(CellsIter->second);
OString key(column.c_str(), static_cast<sal_Int32>(column.size()));
OString valueOString(value.c_str(), static_cast<sal_Int32>(value.size()));
- OUString valueOUString = OStringToOUString( valueOString, RTL_TEXTENCODING_UTF8 );
+ OUString valueOUString = OUString::fromUtf8( valueOString );
entry->setValue(key, valueOUString);
}
::std::vector< sal_Bool > vector = entryMatchedByExpression(this, &expr, entry);
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
index 9b36e68..9450a8a 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
@@ -67,8 +67,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
struct ini_NameValue nameValue;
nameValue.sName = OStringToOUString(
line.copy(0,nIndex).trim(), RTL_TEXTENCODING_ASCII_US );
- nameValue.sValue = OStringToOUString(
- line.copy(nIndex+1).trim(), RTL_TEXTENCODING_UTF8 );
+ nameValue.sValue = OUString::fromUtf8( line.copy(nIndex+1).trim() );
aSection->lList.push_back(nameValue);
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 17428fd..e077f84 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -125,7 +125,7 @@ void bufferEscapeConstant( OUStringBuffer & buf, const OUString & value, Connect
strbuf.setLength( len );
// Previously here RTL_TEXTENCODING_ASCII_US; as we set the PostgreSQL client_encoding to UTF8,
// we get UTF8 here, too. I'm not sure why it worked well before...
- buf.append( OStringToOUString( strbuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) );
+ buf.append( OUString::fromUtf8( strbuf.makeStringAndClear() ) );
}
static inline void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings )
@@ -168,7 +168,7 @@ static inline void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString
-1,
Any());
}
- buf.append( OStringToOUString( cstr, RTL_TEXTENCODING_UTF8 ) );
+ buf.append( OUString::fromUtf8( cstr ) );
PQfreemem( cstr );
}
@@ -553,11 +553,11 @@ void splitConcatenatedIdentifier( const OUString & source, OUString *first, OUSt
{
case 1:
*first = OUString();
- *second = OStringToOUString( vec[0], RTL_TEXTENCODING_UTF8 );
+ *second = OUString::fromUtf8( vec[0] );
break;
case 3:
- *first = OStringToOUString( vec[0], RTL_TEXTENCODING_UTF8 );
- *second = OStringToOUString( vec[2], RTL_TEXTENCODING_UTF8 );
+ *first = OUString::fromUtf8( vec[0] );
+ *second = OUString::fromUtf8( vec[2] );
break;
default:
SAL_WARN("connectivity.postgresql",
@@ -706,15 +706,12 @@ com::sun::star::uno::Sequence< sal_Int32 > parseIntArray( const OUString & str )
{
sal_Int32 start = 0;
IntVector vec;
-// printf( ">%s<\n" , OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
for( sal_Int32 i = str.indexOf( ' ' ) ; i != -1 ; i = str.indexOf( ' ', start) )
{
vec.push_back( (sal_Int32)rtl_ustr_toInt32( &str.pData->buffer[start], 10 ) );
-// printf( "found %d\n" , rtl_ustr_toInt32( &str.pData->buffer[start], 10 ));
start = i + 1;
}
vec.push_back( (sal_Int32)rtl_ustr_toInt32( &str.pData->buffer[start], 10 ) );
-// printf( "found %d\n" , rtl_ustr_toInt32( &str.pData->buffer[start], 10 ));
return sequence_of_vector(vec);
}
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 330a853c..ae8a1b2d 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -523,13 +523,13 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
switch(nTyp)
{
case 0:
- SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME);
+ SQL_NEW_NODE(::rtl::OUString::fromUtf8(sBuffer.makeStringAndClear()), SQL_NODE_NAME);
return SQL_TOKEN_NAME;
case 1:
- SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_STRING);
+ SQL_NEW_NODE(::rtl::OUString::fromUtf8(sBuffer.makeStringAndClear()), SQL_NODE_STRING);
return SQL_TOKEN_STRING;
case 2:
- SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_ACCESS_DATE);
+ SQL_NEW_NODE(::rtl::OUString::fromUtf8(sBuffer.makeStringAndClear()), SQL_NODE_ACCESS_DATE);
return SQL_TOKEN_ACCESS_DATE;
}
}
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index eb2abed..c767867 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1603,7 +1603,7 @@ OSQLParseNode::OSQLParseNode(const OString &_rNewValue,
SQLNodeType eNewNodeType,
sal_uInt32 nNewNodeID)
:m_pParent(NULL)
- ,m_aNodeValue(OStringToOUString(_rNewValue,RTL_TEXTENCODING_UTF8))
+ ,m_aNodeValue(OUString::fromUtf8(_rNewValue))
,m_eNodeType(eNewNodeType)
,m_nNodeID(nNewNodeID)
{
@@ -2301,7 +2301,7 @@ void OSQLParseNode::showParseTree( OUStringBuffer& _inout_rBuffer, sal_uInt32 nL
case SQL_NODE_KEYWORD:
_inout_rBuffer.appendAscii( "SQL_KEYWORD: " );
- _inout_rBuffer.append( OStringToOUString( OSQLParser::TokenIDToStr( getTokenID() ), RTL_TEXTENCODING_UTF8 ) );
+ _inout_rBuffer.append( OUString::fromUtf8( OSQLParser::TokenIDToStr( getTokenID() ) ) );
_inout_rBuffer.append( '\n' );
break;
@@ -2442,7 +2442,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, const SQLParseNodeParamet
rString.appendAscii(" ");
const OString sT = OSQLParser::TokenIDToStr(m_nNodeID, rParam.bInternational ? &rParam.m_rContext : NULL);
- rString.append(OStringToOUString(sT,RTL_TEXTENCODING_UTF8));
+ rString.append(OUString::fromUtf8(sT));
} break;
case SQL_NODE_STRING:
if (!rString.isEmpty())
diff --git a/connectivity/workben/iniParser/main.cxx b/connectivity/workben/iniParser/main.cxx
index e029b4a..f19719d 100644
--- a/connectivity/workben/iniParser/main.cxx
+++ b/connectivity/workben/iniParser/main.cxx
@@ -102,8 +102,7 @@ public:
struct ini_NameValue nameValue;
nameValue.sName = OStringToOUString(
line.copy(0,nIndex).trim(), RTL_TEXTENCODING_ASCII_US );
- nameValue.sValue = OStringToOUString(
- line.copy(nIndex+1).trim(), RTL_TEXTENCODING_UTF8 );
+ nameValue.sValue = OUString::fromUtf8(line.copy(nIndex+1).trim());
aSection->lList.push_back(nameValue);
diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx b/cppcanvas/qa/extras/emfplus/emfplus.cxx
index 70ee827..ac4a6f2 100644
--- a/cppcanvas/qa/extras/emfplus/emfplus.cxx
+++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx
@@ -60,7 +60,7 @@ public:
char* pEnv = getenv("CPPCANVAS_DEBUG_EMFPLUS_DUMP_TO");
if (pEnv)
{
- SvFileStream aStream(OStringToOUString(pEnv, RTL_TEXTENCODING_UTF8), STREAM_WRITE);
+ SvFileStream aStream(OUString::fromUtf8(pEnv), STREAM_WRITE);
vcl::PNGWriter aWriter(aResultBitmap);
CPPUNIT_ASSERT(aWriter.Write(aStream));
}
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 5399dab..1a9b02e 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -381,7 +381,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
{
OString aLine;
aStream.ReadLine( aLine );
- OUString aPersonaSetting( OStringToOUString( aLine, RTL_TEXTENCODING_UTF8 ) );
+ OUString aPersonaSetting( OUString::fromUtf8( aLine ) );
OUString aPreviewFile;
sal_Int32 nNewIndex = aPersonaSetting.indexOf( ';', 0 );
if( nNewIndex < 0 )
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index c192947..6e9774c 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1142,7 +1142,7 @@ namespace
{
::com::sun::star::util::URL aURL;
aURL.Complete = "vnd.sun.star.help://" +
- _sModuleName + "/" + OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8);
+ _sModuleName + "/" + OUString::fromUtf8(sHelpId);
OUString sAnchor;
OUString sTempURL = aURL.Complete;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 5bb7a8d..19abbe0 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -3421,7 +3421,7 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p
OUString sFunctionName = pFunctionName->getTokenValue();
if ( sFunctionName.isEmpty() )
- sFunctionName = OStringToOUString(OSQLParser::TokenIDToStr(pFunctionName->getTokenID()),RTL_TEXTENCODING_UTF8);
+ sFunctionName = OUString::fromUtf8(OSQLParser::TokenIDToStr(pFunctionName->getTokenID()));
nDataType = OSQLParser::getFunctionReturnType(
sFunctionName
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 1f4c2ea..0c097fd 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -191,8 +191,7 @@ void OSelectionBrowseBox::initialize()
for (size_t i = 0; i < sizeof (eFunctions) / sizeof (eFunctions[0]); ++i)
{
m_aFunctionStrings += ";";
- m_aFunctionStrings += OStringToOUString(rContext.getIntlKeywordAscii(eFunctions[i]),
- RTL_TEXTENCODING_UTF8);
+ m_aFunctionStrings += OUString::fromUtf8(rContext.getIntlKeywordAscii(eFunctions[i]));
}
m_aFunctionStrings += ";";
m_aFunctionStrings += sGroup;
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 3d78dee..693406b 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -170,7 +170,7 @@ namespace dbaui
{
rString += "SQL_KEYWORD:";
OString sT = OSQLParser::TokenIDToStr(_pNode->getTokenID());
- rString += OStringToOUString(sT, RTL_TEXTENCODING_UTF8);
+ rString += OUString::fromUtf8(sT);
break;}
case SQL_NODE_COMPARISON:
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 42f6b41..9768a2a 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -176,8 +176,7 @@ ActivePackages::Entries ActivePackages::getEntries() const {
RTL_TEXTENCODING_UTF8),
decodeNewData(i->second)));
} else {
- OUString fn(
- OStringToOUString(i->first, RTL_TEXTENCODING_UTF8));
+ OUString fn(OUString::fromUtf8(i->first));
es.push_back(
::std::make_pair(
::dp_misc::generateLegacyIdentifier(fn),
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 1529fb4..e60f36b 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -253,8 +253,7 @@ void PackageManagerImpl::initActivationLayer(
::rtl::ByteSequence data = dp_misc::readFile(remFileContent);
OString osData(reinterpret_cast<const sal_Char*>(data.getConstArray()),
data.getLength());
- OUString sData = OStringToOUString(
- osData, RTL_TEXTENCODING_UTF8);
+ OUString sData = OUString::fromUtf8(osData);
if (!sData.equals(aUserName))
continue;
}
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 4af0fe3..e5fed36 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -755,7 +755,7 @@ void BackendImpl::PackageImpl::processPackage_(
//we just add all other xcu/xcs files to the configmgr.ini instead of
//rebuilding the directory structure.
OUString url2(
- OStringToOUString(i->first, RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(i->first));
if (url2 != url) {
bool schema = i->second.equalsIgnoreAsciiCase(
"vnd.sun.star.configuration-schema");
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 60c53fb..d23adc1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -158,8 +158,7 @@ static OUString getUString(const char* pString)
if (pString == NULL)
return OUString();
- OString sString(pString, strlen(pString));
- return OStringToOUString(sString, RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(OString(pString, strlen(pString)));
}
// Try to convert a relative URL to an absolute one
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index c0d1979..c64ba81 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -1957,7 +1957,7 @@ OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool b
xmlTextWriterEndDocument( xmlWriter );
xmlFreeTextWriter( xmlWriter );
- return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(aString.makeStringAndClear());
}
OUString XShapeDumper::dump(uno::Reference<drawing::XShape> xPageShapes, bool bDumpInteropProperties)
@@ -1981,7 +1981,7 @@ OUString XShapeDumper::dump(uno::Reference<drawing::XShape> xPageShapes, bool bD
xmlTextWriterEndDocument( xmlWriter );
xmlFreeTextWriter( xmlWriter );
- return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(aString.makeStringAndClear());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/qa/lookuptree/lookuptree_test.cxx b/editeng/qa/lookuptree/lookuptree_test.cxx
index e1a35f4..ff47330 100644
--- a/editeng/qa/lookuptree/lookuptree_test.cxx
+++ b/editeng/qa/lookuptree/lookuptree_test.cxx
@@ -98,12 +98,12 @@ void LookupTreeTest::testTrie()
CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
suggestions.clear();
- trie.insert( OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ) );
+ trie.insert( OUString::fromUtf8( "H\xC3\xA4llo" ) );
trie.findSuggestions( OUString("H"), suggestions );
CPPUNIT_ASSERT_EQUAL( (size_t) 3, suggestions.size() );
CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
CPPUNIT_ASSERT_EQUAL( OUString("H1"), suggestions[1] );
- CPPUNIT_ASSERT_EQUAL( OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ), suggestions[2] );
+ CPPUNIT_ASSERT_EQUAL( OUString::fromUtf8( "H\xC3\xA4llo" ), suggestions[2] );
suggestions.clear();
trie.findSuggestions( OUString("H3"), suggestions );
@@ -111,9 +111,9 @@ void LookupTreeTest::testTrie()
CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
suggestions.clear();
- trie.findSuggestions( OStringToOUString("H\xC3\xA4", RTL_TEXTENCODING_UTF8), suggestions );
+ trie.findSuggestions( OUString::fromUtf8("H\xC3\xA4"), suggestions );
CPPUNIT_ASSERT_EQUAL( (size_t) 1, suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OStringToOUString("H\xC3\xA4llo", RTL_TEXTENCODING_UTF8), suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( OUString::fromUtf8("H\xC3\xA4llo"), suggestions[0] );
suggestions.clear();
trie.findSuggestions( OUString(""), suggestions);
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 26a2512..cbb952a 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -448,8 +448,8 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
if(xPropInfo->hasPropertyByName(uProp))
{
OUString sId = OUString::createFromAscii( INET_HID_SCHEME );
- DBG_ASSERT( INetURLObject( OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
- sId += OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 );
+ DBG_ASSERT( INetURLObject( OUString::fromUtf8( sHelpId ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
+ sId += OUString::fromUtf8( sHelpId );
xPropSet->setPropertyValue( uProp, makeAny( sId ) );
}
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index 2acd027..333a8bc 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -228,7 +228,7 @@ void LdapConnection::initConnection()
data->insert(
LdapData::value_type(
OStringToOUString(attr, RTL_TEXTENCODING_ASCII_US),
- OStringToOUString(*values, RTL_TEXTENCODING_UTF8)));
+ OUString::fromUtf8(*values)));
ldap_value_free(values);
}
attr = ldap_next_attribute(mConnection, result.msg, ptr);
@@ -284,7 +284,7 @@ void LdapConnection::initConnection()
#else
sal_Char *charsDn = ldap_get_dn(mConnection, entry) ;
- userDn = OStringToOUString( charsDn, RTL_TEXTENCODING_UTF8 );
+ userDn = OUString::fromUtf8( charsDn );
ldap_memfree(charsDn) ;
#endif
}
diff --git a/extensions/source/plugin/aqua/macmgr.mm b/extensions/source/plugin/aqua/macmgr.mm
index 878571a..c92f4fe 100644
--- a/extensions/source/plugin/aqua/macmgr.mm
+++ b/extensions/source/plugin/aqua/macmgr.mm
@@ -283,7 +283,7 @@ static rtl::OUString GetNextPluginStringFromHandle(Handle h, short *index)
rtl::OStringBuffer aBuf( nLen );
aBuf.append( pPascalBytes+1, nLen );
*index += nLen + 1;
- return rtl::OStringToOUString( aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
+ return rtl::OUString::fromUtf8( aBuf.makeStringAndClear() );
}
static int parseMimeResource( CFBundleRef i_xBundle,
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 34a2dd0..fa6f4b0 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -809,7 +809,7 @@ namespace pcr
const EventDescription& rEvent = impl_getEventForName_throw( _rPropertyName );
aDescriptor.DisplayName = rEvent.sDisplayName;
aDescriptor.HelpURL = HelpIdUrl::getHelpURL( rEvent.sHelpId );
- aDescriptor.PrimaryButtonId = OStringToOUString(rEvent.sUniqueBrowseId, RTL_TEXTENCODING_UTF8);
+ aDescriptor.PrimaryButtonId = OUString::fromUtf8(rEvent.sUniqueBrowseId);
aDescriptor.HasPrimaryButton = sal_True;
aDescriptor.Category = "Events";
return aDescriptor;
diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx
index 9292a02..0cd148e 100644
--- a/extensions/source/propctrlr/pcrcommon.cxx
+++ b/extensions/source/propctrlr/pcrcommon.cxx
@@ -49,7 +49,7 @@ namespace pcr
OUString HelpIdUrl::getHelpURL( const OString& sHelpId )
{
OUStringBuffer aBuffer;
- OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
+ OUString aTmp( OUString::fromUtf8(sHelpId) );
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
aBuffer.appendAscii( INET_HID_SCHEME );
diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx
index ac0c4b7..647709e 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -77,7 +77,7 @@ static void openFile( OutData& out )
sal_Int32 nIndex = aURL.lastIndexOf('/');
if( nIndex > 0 )
{
- out.File = out.DestinationDir + OStringToOUString(aURL.copy(nIndex), RTL_TEXTENCODING_UTF8);
+ out.File = out.DestinationDir + OUString::fromUtf8(aURL.copy(nIndex));
oslFileError rc;
@@ -329,7 +329,7 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
}
}
if ( !ret )
- out.Handler->downloadStalled( OStringToOUString(aMessage, RTL_TEXTENCODING_UTF8) );
+ out.Handler->downloadStalled( OUString::fromUtf8(aMessage) );
}
curl_easy_cleanup(pCURL);
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 6d2efba..b01880e 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2684,8 +2684,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
OString sComment = pA->GetComment();
if (!sComment.isEmpty())
{
- sType.append(OStringToOUString(
- sComment, RTL_TEXTENCODING_UTF8));
+ sType.append(OUString::fromUtf8(sComment));
}
if (sComment.equalsIgnoreAsciiCase("FIELD_SEQ_BEGIN"))
{
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index a6f0089..691036f 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -115,7 +115,7 @@ OUString SAL_CALL FilterDetect::detect( com::sun::star::uno::Sequence< com::sun:
}
if ( nUniPos == 3 || ( nUniPos == 0 && !bTryUtf16 ) ) // UTF-8 or non-Unicode
- resultString = OStringToOUString( read_uInt8s_ToOString( *pInStream, nSize ), RTL_TEXTENCODING_UTF8 );
+ resultString = OUString::fromUtf8( read_uInt8s_ToOString( *pInStream, nSize ) );
else if ( nUniPos == 2 || bTryUtf16 ) // UTF-16
resultString = read_uInt16s_ToOUString( *pInStream, nSize );
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index 3c497e5..0a2b5a0 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -85,7 +85,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference<
aUTF8QueryURL.append('?');
aUTF8QueryURL.append(aQueryString.makeStringAndClear());
}
- OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
+ OUString aQueryURL = OUString::fromUtf8(aUTF8QueryURL.makeStringAndClear());
ucbhelper::Content aContent(aQueryURL, aEnvironment, m_xContext);
css::uno::Reference< XOutputStream > aPipe( css::io::Pipe::create(m_xContext), UNO_QUERY_THROW );
aContent.openStream(aPipe);
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index 4862008..c45f3c9 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -203,7 +203,7 @@ namespace svt
aHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( );
OUString sHelpURL;
- OUString aTmp( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) );
+ OUString aTmp( OUString::fromUtf8( aHelpId ) );
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
sHelpURL = OUString::createFromAscii( INET_HID_SCHEME );
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 1599447..f88c620 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -239,9 +239,8 @@ OUString PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::
{
sal_uLong nMask = WINDOWSTATE_MASK_ALL;
nMask &= ~(WINDOWSTATE_MASK_MINIMIZED);
- sWindowState = OStringToOUString(
- static_cast<SystemWindow*>(pWindow)->GetWindowState(nMask),
- RTL_TEXTENCODING_UTF8);
+ sWindowState = OUString::fromUtf8(
+ static_cast<SystemWindow*>(pWindow)->GetWindowState(nMask));
}
// <- SOLAR SAFE ------------------------
}
diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx
index 7ff8d45..bb5e735 100644
--- a/framework/source/inc/pattern/window.hxx
+++ b/framework/source/inc/pattern/window.hxx
@@ -62,7 +62,7 @@ static OUString getWindowState(const css::uno::Reference< css::awt::XWindow >& x
}
// <- SOLAR SAFE ----------------------------
- return OStringToOUString(sWindowState,RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(sWindowState);
}
static void setWindowState(const css::uno::Reference< css::awt::XWindow >& xWindow ,
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index ca623ff..55e0dcf 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -88,7 +88,7 @@ OUString retrieveToolbarNameFromHelpURL( vcl::Window* pWindow )
ToolBox* pToolBox = dynamic_cast<ToolBox *>( pWindow );
if ( pToolBox )
{
- aToolbarName = OStringToOUString( pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8 );
+ aToolbarName = OUString::fromUtf8( pToolBox->GetHelpId() );
sal_Int32 i = aToolbarName.lastIndexOf( ':' );
if ( !aToolbarName.isEmpty() && ( i > 0 ) && (( i + 1 ) < aToolbarName.getLength() ))
aToolbarName = aToolbarName.copy( i+1 ); // Remove ".HelpId:" protocol from toolbar name
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 37e1893..de9294df 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1493,7 +1493,7 @@ void LanguageTag::convertFromRtlLocale()
myLtError aError;
theDataRef::get().incRef();
mpImplLangtag = lt_tag_convert_from_locale( aStr.getStr(), &aError.p);
- maBcp47 = OStringToOUString( lt_tag_get_string( mpImplLangtag), RTL_TEXTENCODING_UTF8);
+ maBcp47 = OUString::fromUtf8( lt_tag_get_string( mpImplLangtag));
mbInitializedBcp47 = true;
#else
mnLangID = MsLangId::convertUnxByteStringToLanguage( aStr);
diff --git a/idlc/source/astconstant.cxx b/idlc/source/astconstant.cxx
index b37ff90..7b97979 100644
--- a/idlc/source/astconstant.cxx
+++ b/idlc/source/astconstant.cxx
@@ -109,13 +109,13 @@ bool AstConstant::dumpBlob(
OUString type;
if ( getNodeType() != NT_enum_val )
{
- type = OStringToOUString(exprTypeToString(getConstValueType()), RTL_TEXTENCODING_UTF8);
+ type = OUString::fromUtf8(exprTypeToString(getConstValueType()));
}
rBlob.setFieldData(
index, getDocumentation(), OUString(),
RT_ACCESS_CONST | (published ? RT_ACCESS_PUBLISHED : 0),
- OStringToOUString(name, RTL_TEXTENCODING_UTF8), type, aConst);
+ OUString::fromUtf8(name), type, aConst);
return true;
}
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index c9a2c47..01ca504 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -41,7 +41,7 @@ bool AstModule::dump(RegistryKey& rKey)
localKey = rKey;
}else
{
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey))
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -62,7 +62,7 @@ bool AstModule::dump(RegistryKey& rKey)
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
getDocumentation(), emptyStr, typeClass,
m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0,
+ OUString::fromUtf8(getRelativName()), 0,
nConst, 0, 0);
DeclList::const_iterator iter = getIteratorBegin();
@@ -102,7 +102,7 @@ bool AstModule::dump(RegistryKey& rKey)
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
getDocumentation(), emptyStr, typeClass, m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0, 0, 0,
+ OUString::fromUtf8(getRelativName()), 0, 0, 0,
0);
sal_uInt32 aBlobSize;
@@ -131,7 +131,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
{
OUString emptyStr;
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey))
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -142,11 +142,10 @@ bool AstTypeDef::dump(RegistryKey& rKey)
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
getDocumentation(), emptyStr, RT_TYPE_TYPEDEF, m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 1, 0, 0, 0);
+ OUString::fromUtf8(getRelativName()), 1, 0, 0, 0);
aBlob.setSuperTypeName(
0,
- OStringToOUString(
- getBaseType()->getRelativName(), RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(getBaseType()->getRelativName()));
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
@@ -217,7 +216,7 @@ bool AstService::dump(RegistryKey& rKey)
}
RegistryKey localKey;
if (rKey.createKey(
- OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(getFullName()),
localKey)) {
fprintf(
stderr, "%s: warning, could not create key '%s' in '%s'\n",
@@ -231,12 +230,12 @@ bool AstService::dump(RegistryKey& rKey)
version, getDocumentation(), emptyStr,
getNodeType() == NT_singleton ? RT_TYPE_SINGLETON : RT_TYPE_SERVICE,
m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(getRelativName()),
superName.isEmpty() ? 0 : 1, properties, constructors,
references);
if (!superName.isEmpty()) {
writer.setSuperTypeName(
- 0, OStringToOUString(superName, RTL_TEXTENCODING_UTF8));
+ 0, OUString::fromUtf8(superName));
}
sal_uInt16 constructorIndex = 0;
sal_uInt16 propertyIndex = 0;
@@ -258,8 +257,7 @@ bool AstService::dump(RegistryKey& rKey)
writer.setReferenceData(
referenceIndex++, decl->getDocumentation(), RT_REF_SUPPORTS,
(decl->isOptional() ? RT_ACCESS_OPTIONAL : RT_ACCESS_INVALID),
- OStringToOUString( decl->getRealInterface()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8( decl->getRealInterface()->getRelativName() ));
break;
}
@@ -269,8 +267,7 @@ bool AstService::dump(RegistryKey& rKey)
AstServiceMember * decl = static_cast<AstServiceMember *>(*i);
writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RT_REF_EXPORTS,
(decl->isOptional() ? RT_ACCESS_OPTIONAL : RT_ACCESS_INVALID),
- OStringToOUString(decl->getRealService()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(decl->getRealService()->getRelativName()));
}
break;
@@ -279,8 +276,7 @@ bool AstService::dump(RegistryKey& rKey)
AstObserves * decl = static_cast<AstObserves *>(*i);
writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RT_REF_OBSERVES,
RT_ACCESS_INVALID,
- OStringToOUString( decl->getRealInterface()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8( decl->getRealInterface()->getRelativName()));
break;
}
@@ -289,8 +285,7 @@ bool AstService::dump(RegistryKey& rKey)
AstNeeds * decl = static_cast<AstNeeds *>(*i);
writer.setReferenceData( referenceIndex++, decl->getDocumentation(), RT_REF_NEEDS,
RT_ACCESS_INVALID,
- OStringToOUString( decl->getRealService()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8( decl->getRealService()->getRelativName()));
break;
}
@@ -367,10 +362,10 @@ bool AstAttribute::dumpBlob(
accessMode |= RT_ACCESS_REMOVABLE;
}
- OUString name(OStringToOUString(getLocalName(), RTL_TEXTENCODING_UTF8));
+ OUString name(OUString::fromUtf8(getLocalName()));
rBlob.setFieldData(
index, getDocumentation(), OUString(), accessMode, name,
- OStringToOUString(getType()->getRelativName(), RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(getType()->getRelativName()),
RTConstValue());
dumpExceptions(
rBlob, m_getDocumentation, m_getExceptions, RT_MODE_ATTRIBUTE_GET,
@@ -393,7 +388,7 @@ void AstAttribute::dumpExceptions(
// AstInterface::dump:
writer.setMethodData(
idx, documentation, flags,
- OStringToOUString(getLocalName(), RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(getLocalName()),
OUString("void"), 0,
static_cast< sal_uInt16 >(exceptions.size()));
sal_uInt16 exceptionIndex = 0;
@@ -402,8 +397,7 @@ void AstAttribute::dumpExceptions(
{
writer.setMethodExceptionTypeName(
idx, exceptionIndex++,
- OStringToOUString(
- (*i)->getRelativName(), RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8((*i)->getRelativName()));
}
}
}
diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx
index 1f330b1..7332f1c 100644
--- a/idlc/source/astenum.cxx
+++ b/idlc/source/astenum.cxx
@@ -60,7 +60,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr)
bool AstEnum::dump(RegistryKey& rKey)
{
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey))
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -75,7 +75,7 @@ bool AstEnum::dump(RegistryKey& rKey)
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
getDocumentation(), emptyStr, RT_TYPE_ENUM, m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0,
+ OUString::fromUtf8(getRelativName()), 0,
nConst, 0, 0);
DeclList::const_iterator iter = getIteratorBegin();
diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx
index 8bd8fb7..4f5affb 100644
--- a/idlc/source/astinterface.cxx
+++ b/idlc/source/astinterface.cxx
@@ -103,7 +103,7 @@ bool AstInterface::dump(RegistryKey& rKey)
return true;
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey))
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -194,7 +194,7 @@ bool AstInterface::dump(RegistryKey& rKey)
OUString emptyStr;
typereg::Writer aBlob(
version, getDocumentation(), emptyStr, RT_TYPE_INTERFACE, m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), nBaseTypes,
+ OUString::fromUtf8(getRelativName()), nBaseTypes,
nAttributes, nMethods, nReferences);
sal_uInt16 superTypeIndex = 0;
@@ -206,15 +206,11 @@ bool AstInterface::dump(RegistryKey& rKey)
aBlob.setReferenceData(
referenceIndex++, i->getDocumentation(), RT_REF_SUPPORTS,
RT_ACCESS_OPTIONAL,
- OStringToOUString(
- i->getInterface()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(i->getInterface()->getRelativName()));
} else {
aBlob.setSuperTypeName(
superTypeIndex++,
- OStringToOUString(
- i->getInterface()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(i->getInterface()->getRelativName()));
}
}
diff --git a/idlc/source/astoperation.cxx b/idlc/source/astoperation.cxx
index 5a38c8a..bcc23ec 100644
--- a/idlc/source/astoperation.cxx
+++ b/idlc/source/astoperation.cxx
@@ -48,12 +48,11 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index)
if (m_pReturnType == 0) {
returnTypeName = "void";
} else {
- returnTypeName = OStringToOUString(
- m_pReturnType->getRelativName(), RTL_TEXTENCODING_UTF8);
+ returnTypeName = OUString::fromUtf8(m_pReturnType->getRelativName());
}
rBlob.setMethodData(
index, getDocumentation(), methodMode,
- OStringToOUString(getLocalName(), RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(getLocalName()),
returnTypeName, nParam, nExcep);
if ( nParam )
@@ -91,11 +90,8 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index)
rBlob.setMethodParameterData(
index, paramIndex++, paramMode,
- OStringToOUString(
- pDecl->getLocalName(), RTL_TEXTENCODING_UTF8),
- OStringToOUString(
- pParam->getType()->getRelativName(),
- RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(pDecl->getLocalName()),
+ OUString::fromUtf8(pParam->getType()->getRelativName()));
}
++iter;
}
@@ -110,8 +106,7 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index)
{
rBlob.setMethodExceptionTypeName(
index, exceptIndex++,
- OStringToOUString(
- (*iter)->getRelativName(), RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8((*iter)->getRelativName()));
++iter;
}
}
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx
index 482ee73..b8f0a2e 100644
--- a/idlc/source/aststruct.cxx
+++ b/idlc/source/aststruct.cxx
@@ -78,7 +78,7 @@ bool AstStruct::isType() const {
bool AstStruct::dump(RegistryKey& rKey)
{
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OUString::fromUtf8(getFullName()), localKey))
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -107,14 +107,13 @@ bool AstStruct::dump(RegistryKey& rKey)
(m_typeParameters.empty() && !m_bPublished
? TYPEREG_VERSION_0 : TYPEREG_VERSION_1),
getDocumentation(), emptyStr, typeClass, m_bPublished,
- OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(getRelativName()),
m_pBaseType == 0 ? 0 : 1, nMember, 0,
static_cast< sal_uInt16 >(m_typeParameters.size()));
if (m_pBaseType != 0) {
aBlob.setSuperTypeName(
0,
- OStringToOUString(
- m_pBaseType->getRelativName(), RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8(m_pBaseType->getRelativName()));
}
if ( nMember > 0 )
@@ -140,9 +139,8 @@ bool AstStruct::dump(RegistryKey& rKey)
}
aBlob.setFieldData(
index++, pMember->getDocumentation(), emptyStr, flags,
- OStringToOUString(
- pMember->getLocalName(), RTL_TEXTENCODING_UTF8),
- OStringToOUString(typeName, RTL_TEXTENCODING_UTF8),
+ OUString::fromUtf8(pMember->getLocalName()),
+ OUString::fromUtf8(typeName),
RTConstValue());
}
++iter;
@@ -155,8 +153,7 @@ bool AstStruct::dump(RegistryKey& rKey)
{
aBlob.setReferenceData(
index++, emptyStr, RT_REF_TYPE_PARAMETER, RT_ACCESS_INVALID,
- OStringToOUString(
- (*i)->getLocalName(), RTL_TEXTENCODING_UTF8));
+ OUString::fromUtf8((*i)->getLocalName()));
}
sal_uInt32 aBlobSize;
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx
index 75a71df..b5ed727 100644
--- a/idlc/source/idlc.cxx
+++ b/idlc/source/idlc.cxx
@@ -272,7 +272,7 @@ OUString Idlc::processDocumentation()
if (m_bIsDocValid) {
OString raw(getDocumentation());
if (m_bGenerateDoc) {
- doc = OStringToOUString(raw, RTL_TEXTENCODING_UTF8);
+ doc = OUString::fromUtf8(raw);
} else if (raw.indexOf("@deprecated") != -1) {
//TODO: this check is somewhat crude
doc = "@deprecated";
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 695db41..53fd802 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -258,9 +258,8 @@ sal_Int32 compileFile(const OString * pathname)
{
cppArgs.append("-I");
cppArgs.append(filePath);
- lCppArgs.push_back(OStringToOUString(
- cppArgs.makeStringAndClear().replace('\\', '/'),
- RTL_TEXTENCODING_UTF8));
+ lCppArgs.push_back(OUString::fromUtf8(
+ cppArgs.makeStringAndClear().replace('\\', '/')));
}
}
@@ -272,7 +271,7 @@ sal_Int32 compileFile(const OString * pathname)
{
token = dOpt.getToken( 0, ' ', nIndex );
if (token.getLength())
- lCppArgs.push_back(OStringToOUString("-D" + token, RTL_TEXTENCODING_UTF8));
+ lCppArgs.push_back(OUString::fromUtf8("-D" + token));
} while( nIndex != -1 );
}
@@ -284,17 +283,17 @@ sal_Int32 compileFile(const OString * pathname)
{
token = incOpt.getToken( 0, ' ', nIndex );
if (token.getLength())
- lCppArgs.push_back(OStringToOUString("-I" + token, RTL_TEXTENCODING_UTF8));
+ lCppArgs.push_back(OUString::fromUtf8("-I" + token));
} while( nIndex != -1 );
}
lCppArgs.push_back(OUString("-o"));
cppArgs.append(preprocFile);
- lCppArgs.push_back(OStringToOUString(cppArgs.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ lCppArgs.push_back(OUString::fromUtf8(cppArgs.makeStringAndClear()));
cppArgs.append(tmpFile);
- lCppArgs.push_back(OStringToOUString(cppArgs.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ lCppArgs.push_back(OUString::fromUtf8(cppArgs.makeStringAndClear()));
OUString cpp;
OUString startDir;
diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx
index 35a3a20..d7dd9f1 100644
--- a/idlc/source/idlcproduce.cxx
+++ b/idlc/source/idlcproduce.cxx
@@ -119,7 +119,7 @@ static bool cleanPath()
void removeIfExists(const OString& pathname)
{
- osl::File::remove(OStringToOUString(pathname, RTL_TEXTENCODING_UTF8));
+ osl::File::remove(OUString::fromUtf8(pathname));
}
sal_Int32 SAL_CALL
@@ -154,7 +154,7 @@ produceFile(const OString& regFileName, sPair_t const*const pDepFile)
OString urlRegTmpName = convertToFileUrl(regTmpName);
Registry regFile;
- if ( regFile.create(OStringToOUString(urlRegTmpName, RTL_TEXTENCODING_UTF8)) != REG_NO_ERROR )
+ if ( regFile.create(OUString::fromUtf8(urlRegTmpName)) != REG_NO_ERROR )
{
fprintf(stderr, "%s: could not create registry file '%s'\n",
pOptions->getProgramName().getStr(), regTmpName.getStr());
@@ -184,7 +184,7 @@ produceFile(const OString& regFileName, sPair_t const*const pDepFile)
fprintf(stderr, "%s: could not close registry file '%s'\n",
pOptions->getProgramName().getStr(), regFileName.getStr());
}
- regFile.destroy(OStringToOUString(regFileName, RTL_TEXTENCODING_UTF8));
+ regFile.destroy(OUString::fromUtf8(regFileName));
removeIfExists(regFileName);
cleanPath();
return 1;
diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx
index dfdb9bd..cf6e46d 100644
--- a/idlc/source/options.cxx
+++ b/idlc/source/options.cxx
@@ -197,7 +197,7 @@ bool Options::setOption(char const * option, std::string const & rArg)
with error.
*/
OString convertIncPathtoShortWindowsPath(const OString& incPath) {
- OUString path = OStringToOUString(incPath, RTL_TEXTENCODING_UTF8);
+ OUString path = OUString::fromUtf8(incPath);
std::vector<sal_Unicode> vec(path.getLength() + 1);
//GetShortPathNameW only works if the file can be found!
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 4007780..a9267ac 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -61,7 +61,6 @@
using ::rtl::OUString;
using ::rtl::OString;
-using ::rtl::OStringToOUString;
using ::rtl::OStringBuffer;
extern int yylex(void);
@@ -897,8 +896,7 @@ attribute_get_raises:
IDL_GET raises ';'
{
$$.documentation = new rtl::OUString(
- rtl::OStringToOUString(
- idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
+ rtl::OUString::fromUtf8(idlc()->getDocumentation()));
$$.exceptions = $2;
}
;
@@ -920,8 +918,7 @@ attribute_set_raises:
raises ';'
{
$$.documentation = new rtl::OUString(
- rtl::OStringToOUString(
- idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
+ rtl::OUString::fromUtf8(idlc()->getDocumentation()));
$$.exceptions = $3;
}
;
@@ -1203,8 +1200,7 @@ interface_inheritance_decl:
} else {
addInheritedInterface(
ifc, *$4, $1,
- rtl::OStringToOUString(
- idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
+ rtl::OUString::fromUtf8(idlc()->getDocumentation()));
}
delete $4;
}
diff --git a/include/codemaker/typemanager.hxx b/include/codemaker/typemanager.hxx
index d9bb4d8..be67e1a 100644
--- a/include/codemaker/typemanager.hxx
+++ b/include/codemaker/typemanager.hxx
@@ -68,7 +68,7 @@ inline OString u2b(OUString const & s) {
}
inline OUString b2u(OString const & s) {
- return OStringToOUString(s, RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(s);
}
#endif
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 84dcbb5..48143b3 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -142,9 +142,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
sVersion = xmlNodeListGetString(
m_xmlDocVendorSettings,
xPathObjectMin->nodesetval->nodeTab[0]->xmlChildrenNode, 1);
- OString osVersion((sal_Char*)(xmlChar*) sVersion);
- aVersionInfo.sMinVersion = OStringToOUString(
- osVersion, RTL_TEXTENCODING_UTF8);
+ aVersionInfo.sMinVersion = OUString::fromUtf8(OString((sal_Char*)(xmlChar*) sVersion));
}
//Get maxVersion
@@ -164,9 +162,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
sVersion = xmlNodeListGetString(
m_xmlDocVendorSettings,
xPathObjectMax->nodesetval->nodeTab[0]->xmlChildrenNode, 1);
- OString osVersion((sal_Char*) (xmlChar*) sVersion);
- aVersionInfo.sMaxVersion = OStringToOUString(
- osVersion, RTL_TEXTENCODING_UTF8);
+ aVersionInfo.sMaxVersion = OUString::fromUtf8(OString((sal_Char*) (xmlChar*) sVersion));
}
//Get excludeVersions
@@ -188,9 +184,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
CXmlCharPtr sVersion;
sVersion = xmlNodeListGetString(
m_xmlDocVendorSettings, cur->xmlChildrenNode, 1);
- OString osVersion((sal_Char*)(xmlChar*) sVersion);
- OUString usVersion = OStringToOUString(
- osVersion, RTL_TEXTENCODING_UTF8);
+ OUString usVersion = OUString::fromUtf8(OString((sal_Char*)(xmlChar*) sVersion));
aVersionInfo.addExcludeVersion(usVersion);
}
}
diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx
index 838c735..c7ac695a 100644
--- a/jvmfwk/source/libxmlutil.cxx
+++ b/jvmfwk/source/libxmlutil.cxx
@@ -130,7 +130,7 @@ CXmlCharPtr::operator OUString()
if (_object != NULL)
{
OString aOStr((sal_Char*)_object);
- ret = OStringToOUString(aOStr, RTL_TEXTENCODING_UTF8);
+ ret = OUString::fromUtf8(aOStr);
}
return ret;
}
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 5546e9e..5c3f134 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -126,8 +126,7 @@ void InitPoFile(
//Create directory for po file
{
OUString outDir =
- OStringToOUString(
- rPotDir.copy(0,rPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8);
+ OUString::fromUtf8(rPotDir.copy(0,rPotDir.lastIndexOf('/')));
OUString outDirUrl;
if (osl::FileBase::getFileURLFromSystemPath(outDir, outDirUrl)
!= osl::FileBase::E_None)
@@ -407,8 +406,7 @@ void handleDirectory(
//Remove empty pot directory
OUString sPoPath =
- OStringToOUString(
- rPotDir.copy(0,rPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8);
+ OUString::fromUtf8(rPotDir.copy(0,rPotDir.lastIndexOf('/')));
OUString sPoUrl;
if (osl::FileBase::getFileURLFromSystemPath(sPoPath, sPoUrl)
!= osl::FileBase::E_None)
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index a1836ca..e75581d 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -121,7 +121,7 @@ static void checkStyleNames(const OString& aLanguage)
aPoInput.close();
aPoOutput.close();
OUString aPoPathURL;
- osl::FileBase::getFileURLFromSystemPath(OStringToOUString(aPoPath, RTL_TEXTENCODING_UTF8), aPoPathURL);
+ osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(aPoPath), aPoPathURL);
if( bAnyError )
osl::File::move(aPoPathURL + ".new", aPoPathURL);
else
@@ -343,7 +343,7 @@ static void checkFunctionNames(const OString& aLanguage)
}
aPoInput.close();
aPoOutput.close();
- osl::FileBase::getFileURLFromSystemPath(OStringToOUString(aPoPaths[i], RTL_TEXTENCODING_UTF8), aPoPathURL);
+ osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(aPoPaths[i]), aPoPathURL);
if( bAnyError )
osl::File::move(aPoPathURL + ".new", aPoPathURL);
else
@@ -395,7 +395,7 @@ static void checkVerticalBar(const OString& aLanguage)
aPoInput.close();
aPoOutput.close();
OUString aPoPathURL;
- osl::FileBase::getFileURLFromSystemPath(OStringToOUString(aPoPath, RTL_TEXTENCODING_UTF8), aPoPathURL);
+ osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(aPoPath), aPoPathURL);
if( bError )
osl::File::move(aPoPathURL + ".new", aPoPathURL);
else
@@ -444,7 +444,7 @@ static void checkMathSymbolNames(const OString& aLanguage)
aPoInput.close();
aPoOutput.close();
OUString aPoPathURL;
- osl::FileBase::getFileURLFromSystemPath(OStringToOUString(aPoPath, RTL_TEXTENCODING_UTF8), aPoPathURL);
+ osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(aPoPath), aPoPathURL);
if( bError )
osl::File::move(aPoPathURL + ".new", aPoPathURL);
else
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index a41cd15..25a7b15 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -61,8 +61,7 @@ namespace
//Escape unicode characters
static void lcl_PrintJavaStyle( const OString& rText, std::ofstream &rOfstream )
{
- const OUString sTemp =
- OStringToOUString( rText, RTL_TEXTENCODING_UTF8 );
+ const OUString sTemp = OUString::fromUtf8( rText );
for ( sal_Int32 nIndex = 0; nIndex < sTemp.getLength(); ++nIndex )
{
sal_Unicode cUniCode = sTemp[nIndex];
diff --git a/l10ntools/source/uimerge.cxx b/l10ntools/source/uimerge.cxx
index 5954ab1..34612bf 100644
--- a/l10ntools/source/uimerge.cxx
+++ b/l10ntools/source/uimerge.cxx
@@ -135,7 +135,7 @@ bool Merge(
{
bool bDestinationIsDir(false);
- const OUString aDestDir(OStringToOUString(rDestinationDir, RTL_TEXTENCODING_UTF8));
+ const OUString aDestDir(OUString::fromUtf8(rDestinationDir));
OUString aDestDirUrl;
if (osl::FileBase::E_None == osl::FileBase::getFileURLFromSystemPath(aDestDir, aDestDirUrl))
{
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 2c376cf..d82d4f3 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -799,7 +799,7 @@ namespace
static OUString lcl_pathnameToAbsoluteUrl(const OString& rPathname)
{
- OUString sPath = OStringToOUString(rPathname, RTL_TEXTENCODING_UTF8 );
+ OUString sPath = OUString::fromUtf8(rPathname);
OUString sUrl;
if (osl::FileBase::getFileURLFromSystemPath(sPath, sUrl)
!= osl::FileBase::E_None)
@@ -1139,7 +1139,7 @@ OString XMLUtil::QuotHTML( const OString &rString )
reinterpret_cast<const UChar*>(sPattern.getStr()),
sPattern.getLength() );
- const OUString sOUSource = OStringToOUString(rString, RTL_TEXTENCODING_UTF8);
+ const OUString sOUSource = OUString::fromUtf8(rString);
icu::UnicodeString sSource(
reinterpret_cast<const UChar*>(
sOUSource.getStr()), sOUSource.getLength() );
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 6cd87c2..a035314 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -339,7 +339,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
{
if (aLine[0] == '#') // skip comments
continue;
- OUString aText = OStringToOUString(aLine, RTL_TEXTENCODING_UTF8);
+ OUString aText = OUString::fromUtf8(aLine);
uno::Reference< XDictionaryEntry > xEntry =
new DicEntry( aText, eDicType == DictionaryType_NEGATIVE );
addEntry_Impl( xEntry, true ); //! don't launch events here
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx
index 0eadef1..2edc40c 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -34,7 +34,7 @@ void lcl_parseAdjustmentValue(comphelper::SequenceAsVector<drawing::EnhancedCust
if (aToken.startsWith(aNamePrefix))
{
OString aName = aToken.copy(aNamePrefix.getLength(), aToken.getLength() - aNamePrefix.getLength() - strlen("\""));
- aAdjustmentValue.Name = OStringToOUString(aName, RTL_TEXTENCODING_UTF8);
+ aAdjustmentValue.Name = OUString::fromUtf8(aName);
}
else if (aToken.startsWith(aValuePrefix))
{
@@ -414,7 +414,7 @@ void lcl_parseEquations(comphelper::SequenceAsVector<OUString>& rEquations, cons
else if (rValue[i] == '"' && bInString)
{
bInString = false;
- rEquations.push_back(OStringToOUString(rValue.copy(nStart + strlen("\""), i - nStart - strlen("\"")), RTL_TEXTENCODING_UTF8));
+ rEquations.push_back(OUString::fromUtf8(rValue.copy(nStart + strlen("\""), i - nStart - strlen("\""))));
}
}
}
@@ -734,7 +734,7 @@ void CustomShapeProperties::initializePresetDataMap()
bFirst = false;
else
maPresetDataMap[StaticTokenMap::get().getTokenFromUnicode(aName)] = aPropertyMap;
- aName = OStringToOUString(aLine.copy(aCommentPrefix.getLength(), aLine.getLength() - aCommentPrefix.getLength() - strlen(" */")), RTL_TEXTENCODING_UTF8);
+ aName = OUString::fromUtf8(aLine.copy(aCommentPrefix.getLength(), aLine.getLength() - aCommentPrefix.getLength() - strlen(" */")));
}
else
{
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 821648d..2069cea 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -38,9 +38,9 @@ namespace rptui
\************************************************************************/
ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const OString &rDialog)
- : SfxTabDialog (pParent, rDialog, OUString("modules/dbreport/ui/") +
- OStringToOUString(rDialog, RTL_TEXTENCODING_UTF8).toAsciiLowerCase() +
- OUString(".ui"), pAttr)
+ : SfxTabDialog (pParent, rDialog,
+ "modules/dbreport/ui/" + OUString::fromUtf8(rDialog).toAsciiLowerCase() + ".ui",
+ pAttr)
, rOutAttrs(*pAttr)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 792b64c..a2cea93 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -36,7 +36,7 @@ namespace rptui
OUString HelpIdUrl::getHelpURL( const OString& sHelpId )
{
OUStringBuffer aBuffer;
- OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
+ OUString aTmp( OUString::fromUtf8(sHelpId) );
DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
aBuffer.appendAscii( INET_HID_SCHEME );
aBuffer.append( aTmp.getStr() );
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index b9df2ba..0ec25cd 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -145,7 +145,7 @@ ODesignView::~ODesignView()
}
if ( m_pReportExplorer )
{
- SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_WINDOW, OUString::fromUtf8(m_pReportExplorer->GetHelpId()));
aDlgOpt.SetWindowState(OStringToOUString(m_pReportExplorer->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
::std::unique_ptr<vcl::Window> aTemp2(m_pReportExplorer);
@@ -488,7 +488,7 @@ void ODesignView::toggleReportExplorer()
{
OReportController& rReportController = getController();
m_pReportExplorer = new ONavigator(this,rReportController);
- SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_WINDOW, OUString::fromUtf8(m_pReportExplorer->GetHelpId()));
if ( aDlgOpt.Exists() )
m_pReportExplorer->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
m_pReportExplorer->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl));
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 2fa10d6..f8755f4 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -337,7 +337,7 @@ void OReportController::disposing()
}
if ( m_pGroupsFloater )
{
- SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_WINDOW, OUString::fromUtf8(m_pGroupsFloater->GetHelpId()));
aDlgOpt.SetWindowState(OStringToOUString(m_pGroupsFloater->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
::std::unique_ptr<FloatingWindow> aTemp(m_pGroupsFloater);
m_pGroupsFloater = NULL;
@@ -2595,7 +2595,7 @@ void OReportController::openSortingAndGroupingDialog()
if ( !m_pGroupsFloater )
{
m_pGroupsFloater = new OGroupsSortingDialog(getView(),!isEditable(),this);
- SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_WINDOW, OUString::fromUtf8(m_pGroupsFloater->GetHelpId()));
if ( aDlgOpt.Exists() )
m_pGroupsFloater->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
m_pGroupsFloater->AddEventListener(LINK(this,OReportController,EventLstHdl));
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index fdf44a0..ddb11f9 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -43,7 +43,6 @@ using namespace osl;
using ::rtl::OUString;
using ::rtl::OUStringToOString;
using ::rtl::OString;
-using ::rtl::OStringToOUString;
// helper functions
@@ -474,7 +473,7 @@ namespace osl_FileBase
void getAbsoluteFileURL::check_getAbsoluteFileURL( rtl::OUString const& _suBaseURL, rtl::OString const& _sRelativeURL, ::osl::FileBase::RC _nAssumeError, rtl::OUString const& _suAssumeResultStr )
{
- rtl::OUString suRelativeURL = rtl::OStringToOUString(_sRelativeURL, RTL_TEXTENCODING_UTF8);
+ rtl::OUString suRelativeURL = rtl::OUString::fromUtf8(_sRelativeURL);
rtl::OString sBaseURL = rtl::OUStringToOString(_suBaseURL, RTL_TEXTENCODING_UTF8);
rtl::OUString suResultURL;
osl::FileBase::RC nError = FileBase::getAbsoluteFileURL( _suBaseURL, suRelativeURL, suResultURL );
@@ -674,25 +673,21 @@ namespace osl_FileBase
// PRE: URL as String
rtl::OUString suSource;
rtl::OUString suStr;
- suSource = rtl::OStringToOUString(_sSource, RTL_TEXTENCODING_UTF8);
- ::osl::FileBase::RC nError;
- if ( bDirection )
- nError = osl::FileBase::getSystemPathFromFileURL( suSource, suStr );
- else
- nError = osl::FileBase::getFileURLFromSystemPath( suSource, suStr );
+ suSource = rtl::OUString::fromUtf8(_sSource);
+ ::osl::FileBase::RC nError;
+ if ( bDirection )
+ nError = osl::FileBase::getSystemPathFromFileURL( suSource, suStr );
+ else
+ nError = osl::FileBase::getFileURLFromSystemPath( suSource, suStr );
// if the given string is gt length 0,
// we check also this string
rtl::OString sStr = rtl::OUStringToOString(suStr, RTL_TEXTENCODING_UTF8);
rtl::OString sError = errorToString(nError);
- if ( bDirection )
- printf("getSystemPathFromFileURL('%s') deliver system path: '%s', error '%s'\n", _sSource.getStr(), sStr.getStr(), sError.getStr() );
- else
- printf("getFileURLFromSystemPath('%s') deliver File URL: '%s', error '%s'\n", _sSource.getStr(), sStr.getStr(), sError.getStr() );
-
- // rtl::OUString suStrEncode = rtl::Uri::encode(suStr, rtl_UriCharClassUnoParamValue, rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8);
- // sStr = rtl::OUStringToOString(suStr, RTL_TEXTENCODING_UTF8);
- // printf("UTF8: %s\n", sStr.getStr() );
+ if ( bDirection )
+ printf("getSystemPathFromFileURL('%s') deliver system path: '%s', error '%s'\n", _sSource.getStr(), sStr.getStr(), sError.getStr() );
+ else
+ printf("getFileURLFromSystemPath('%s') deliver File URL: '%s', error '%s'\n", _sSource.getStr(), sStr.getStr(), sError.getStr() );
if (!_sAssumeResultStr.isEmpty())
{
@@ -4857,7 +4852,7 @@ namespace osl_Directory
#endif
tmp_x += rtl::OString(TEST_PATH_POSTFIX);
- rc = FileBase::getFileURLFromSystemPath(rtl::OStringToOUString(tmp_x, RTL_TEXTENCODING_UTF8), test_path);
+ rc = FileBase::getFileURLFromSystemPath(rtl::OUString::fromUtf8(tmp_x), test_path);
CPPUNIT_ASSERT_MESSAGE
(
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 5719ae4..b2ca0a9 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -377,8 +377,7 @@ Bootstrap_Impl::Bootstrap_Impl( OUString const & rIniName )
struct rtl_bootstrap_NameValue nameValue;
nameValue.sName = OStringToOUString(
line.copy(0,nIndex).trim(), RTL_TEXTENCODING_ASCII_US );
- nameValue.sValue = OStringToOUString(
- line.copy(nIndex+1).trim(), RTL_TEXTENCODING_UTF8 );
+ nameValue.sValue = OUString::fromUtf8(line.copy(nIndex+1).trim());
#if OSL_DEBUG_LEVEL > 1
OString name_tmp = OUStringToOString(nameValue.sName, RTL_TEXTENCODING_ASCII_US);
@@ -987,14 +986,13 @@ rtl::OUString expandMacros(
// replacement text (and if it did, it would fail to
// detect cycles that pass through here):
buf.append(
- rtl::OStringToOUString(
+ rtl::OUString::fromUtf8(
osl::Profile(seg[0]).readString(
rtl::OUStringToOString(
seg[1], RTL_TEXTENCODING_UTF8),
rtl::OUStringToOString(
seg[2], RTL_TEXTENCODING_UTF8),
- rtl::OString()),
- RTL_TEXTENCODING_UTF8));
+ rtl::OString())));
}
}
} else {
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index e2cbcc6..e54e2e3 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -46,9 +46,9 @@ void UnknownAttribute::FillAttribute( Attribute* pAttrib ) const
{
if( pAttrib )
{
- pAttrib->Name = OStringToOUString( maName, RTL_TEXTENCODING_UTF8 );
+ pAttrib->Name = OUString::fromUtf8( maName );
pAttrib->NamespaceURL = maNamespaceURL;
- pAttrib->Value = OStringToOUString( maValue, RTL_TEXTENCODING_UTF8 );
+ pAttrib->Value = OUString::fromUtf8( maValue );
}
}
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 23db69e..7e54cfcf 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -154,7 +154,7 @@ std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const
if ( mpArryDevsID[i] != 0 )
{
OString fileName = createFileName(gpuEnv.mpArryDevsID[i], clFileName);
- osl::File* pNewFile = new osl::File(rtl::OStringToOUString(fileName, RTL_TEXTENCODING_UTF8));
+ osl::File* pNewFile = new osl::File(rtl::OUString::fromUtf8(fileName));
if(pNewFile->open(osl_File_OpenFlag_Read) == osl::FileBase::E_None)
{
aGeneratedFiles.push_back(boost::shared_ptr<osl::File>(pNewFile));
@@ -174,7 +174,7 @@ std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const
bool OpenCLDevice::writeBinaryToFile( const OString& rFileName, const char* binary, size_t numBytes )
{
- osl::File file(rtl::OStringToOUString(rFileName, RTL_TEXTENCODING_UTF8));
+ osl::File file(rtl::OUString::fromUtf8(rFileName));
osl::FileBase::RC status = file.open(
osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
@@ -345,7 +345,7 @@ bool buildProgram(const char* buildOption, GPUEnv* gpuInfo, int idx)
}
OString aBuildLogFileURL = OpenCLDevice::maCacheFolder + "kernel-build.log";
- osl::File aBuildLogFile(rtl::OStringToOUString(aBuildLogFileURL, RTL_TEXTENCODING_UTF8));
+ osl::File aBuildLogFile(rtl::OUString::fromUtf8(aBuildLogFileURL));
osl::FileBase::RC status = aBuildLogFile.open(
osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 8fa70fb..23c3845 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -3043,7 +3043,7 @@ void ScInterpreter::ScBahtText()
if( bMinus )
aText.insert( 0, OString( UTF8_TH_MINUS ) );
- PushString( OStringToOUString(aText.makeStringAndClear(), RTL_TEXTENCODING_UTF8) );
+ PushString( OUString::fromUtf8(aText.makeStringAndClear()) );
}
}
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 8131a54..66ffd19 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -93,13 +93,13 @@ void ScInterpreter::ScFilterXML()
xmlNsPtr ns = (xmlNsPtr)pNodeSet->nodeTab[0];
xmlNodePtr cur = (xmlNodePtr)ns->next;
boost::shared_ptr<xmlChar> pChar2(xmlNodeGetContent(cur), xmlFree);
- aResult = OStringToOUString(OString((char*)pChar2.get()), RTL_TEXTENCODING_UTF8);
+ aResult = OUString::fromUtf8(OString((char*)pChar2.get()));
}
else
{
xmlNodePtr cur = pNodeSet->nodeTab[0];
boost::shared_ptr<xmlChar> pChar2(xmlNodeGetContent(cur), xmlFree);
- aResult = OStringToOUString(OString((char*)pChar2.get()), RTL_TEXTENCODING_UTF8);
+ aResult = OUString::fromUtf8(OString((char*)pChar2.get()));
}
}
else
@@ -198,7 +198,7 @@ void ScInterpreter::ScWebservice()
xStream->closeInput();
- OUString aContent = OStringToOUString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
+ OUString aContent = OUString::fromUtf8( aBuffer.makeStringAndClear() );
PushString( aContent );
}
}
diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx
index d0d3c37..288e9d3 100644
--- a/sc/source/filter/oox/numberformatsbuffer.cxx
+++ b/sc/source/filter/oox/numberformatsbuffer.cxx
@@ -1891,7 +1891,7 @@ void NumberFormat::setFormatCode( const OUString& rFmtCode )
void NumberFormat::setFormatCode( const Locale& rLocale, const sal_Char* pcFmtCode )
{
maModel.maLocale = rLocale;
- maModel.maFmtCode = OStringToOUString( OString( pcFmtCode ), RTL_TEXTENCODING_UTF8 );
+ maModel.maFmtCode = OUString::fromUtf8( OString( pcFmtCode ) );
maModel.mnPredefId = -1;
}
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 3735f28..e688a0f 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -432,7 +432,7 @@ void ScOrcusSharedStrings::append_segment(const char* s, size_t n)
size_t ScOrcusSharedStrings::commit_segments()
{
OString aStr = maCurSegment.makeStringAndClear();
- return mrFactory.addString(OStringToOUString(aStr, RTL_TEXTENCODING_UTF8));
+ return mrFactory.addString(OUString::fromUtf8(aStr));
}
void ScOrcusStyles::set_font_count(size_t /*n*/)
diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx
index c6782d1..23cb845 100644
--- a/sc/source/ui/miscdlgs/mtrindlg.cxx
+++ b/sc/source/ui/miscdlgs/mtrindlg.cxx
@@ -35,8 +35,7 @@ ScMetricInputDlg::ScMetricInputDlg( vcl::Window* pParent,
long nLast )
: ModalDialog(pParent, sDialogName,
- OStringToOUString("modules/scalc/ui/" +
- sDialogName.toAsciiLowerCase() + ".ui", RTL_TEXTENCODING_UTF8))
+ OUString::fromUtf8("modules/scalc/ui/" + sDialogName.toAsciiLowerCase() + ".ui"))
{
get(m_pEdValue, "value");
get(m_pBtnDefVal, "default");
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 897f268..d5d3552 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1084,7 +1084,7 @@ OUString HtmlExport::DocumentMetadata() const
OString aData(reinterpret_cast<const char*>(aStream.GetData()), aStream.GetSize());
- return OStringToOUString(aData, RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(aData);
}
bool HtmlExport::CreateHtmlTextForPresPages()
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 0429ecf..506af5b 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -443,7 +443,7 @@ bool ImplSdPPTImport::Import()
{ // second pass, searching for a SlideName
for ( nToken = 0; nToken < nTokenCount; nToken++ )
{
- OUString aToken(OStringToOUString(aStringAry[nToken], RTL_TEXTENCODING_UTF8));
+ OUString aToken(OUString::fromUtf8(aStringAry[nToken]));
std::vector<OUString>::const_iterator pIter =
std::find(maSlideNameList.begin(),maSlideNameList.end(),aToken);
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 6a68229..46e0d4a 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -627,7 +627,7 @@ vcl::Window * lcl_GetTopmostParent( vcl::Window * pWindow )
void CustomAnimationCreateDialog::setPosition()
{
- SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(), RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_TABDIALOG, OUString::fromUtf8(GetHelpId()));
if ( aDlgOpt.Exists() )
{
SetWindowState( OUStringToOString(aDlgOpt.GetWindowState(),
@@ -654,7 +654,7 @@ void CustomAnimationCreateDialog::setPosition()
void CustomAnimationCreateDialog::storePosition()
{
// save settings (screen position and current page)
- SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(), RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_TABDIALOG, OUString::fromUtf8(GetHelpId()));
aDlgOpt.SetWindowState(OStringToOUString(
GetWindowState(WINDOWSTATE_MASK_POS), RTL_TEXTENCODING_ASCII_US));
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index d5bf966..e3c336f 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -492,7 +492,7 @@ sal_Int32 OSXBluetoothWrapper::readLine( OString& aLine )
mBuffer.erase( mBuffer.begin(), aIt + 1 ); // Also delete the empty line
// yeps
- SAL_INFO( "sdremote.bluetooth", " returning, got \"" << OStringToOUString( aLine, RTL_TEXTENCODING_UTF8 ) << "\"" );
+ SAL_INFO( "sdremote.bluetooth", " returning, got \"" << OUString::fromUtf8( aLine ) << "\"" );
return aLine.getLength() + 1;
}
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 7404bbd..07321ba 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -131,9 +131,8 @@ void RemoteServer::execute()
MutexGuard aGuard( sDataMutex );
::boost::shared_ptr< ClientInfoInternal > pClient(
new ClientInfoInternal(
- OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ),
- aAddress, false, pSocket, OStringToOUString( aPin,
- RTL_TEXTENCODING_UTF8 ) ) );
+ OUString::fromUtf8( aName ),
+ aAddress, false, pSocket, OUString::fromUtf8( aPin ) ) );
mAvailableClients.push_back( pClient );
// Read off any additional non-empty lines
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 7607058..5fef512 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -185,7 +185,7 @@ OUString PDFName::getFilteredName() const
else
aFilter.append( pStr[i] );
}
- return OStringToOUString( aFilter.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
+ return OUString::fromUtf8( aFilter.makeStringAndClear() );
}
PDFString::~PDFString()
diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx
index 0a856ea..c4b91a8 100644
--- a/sdext/source/pdfimport/sax/emitcontext.cxx
+++ b/sdext/source/pdfimport/sax/emitcontext.cxx
@@ -52,7 +52,7 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc
static const char* pDir = getenv( "DBG_PDFIMPORT_DIR" );
if( pDir )
{
- OUString aStr( OStringToOUString( pDir, RTL_TEXTENCODING_UTF8 ) );
+ OUString aStr( OUString::fromUtf8( pDir ) );
OUString aFileURL;
osl_getFileURLFromSystemPath( aStr.pData, &aFileURL.pData );
OUStringBuffer aBuf( 256 );
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx
index 4e91dcf..e5fdf45 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -76,7 +76,7 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle )
sal_Int32 StyleContainer::getStandardStyleId( const OString& rName )
{
PropertyMap aProps;
- aProps[ "style:family" ] = OStringToOUString( rName, RTL_TEXTENCODING_UTF8 );
+ aProps[ "style:family" ] = OUString::fromUtf8( rName );
aProps[ "style:name" ] = "standard";
Style aStyle( "style:style", aProps );
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 79d64fd..c6e0960 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -382,7 +382,7 @@ void Parser::readChar()
// chars gobble up rest of line
m_nCharIndex = -1;
- m_pSink->drawGlyphs(OStringToOUString(aChars, RTL_TEXTENCODING_UTF8),
+ m_pSink->drawGlyphs(OUString::fromUtf8(aChars),
aRect, aUnoMatrix, fontSize);
}
@@ -600,8 +600,7 @@ void Parser::readFont()
}
// yet unknown font - get info and add to map
- FontAttributes aResult( OStringToOUString( aFontName,
- RTL_TEXTENCODING_UTF8 ),
+ FontAttributes aResult( OUString::fromUtf8( aFontName ),
nIsBold != 0,
nIsItalic != 0,
nIsUnderline != 0,
@@ -783,9 +782,8 @@ void Parser::readLink()
readDouble(aBounds.Y2);
m_pSink->hyperLink( aBounds,
- OStringToOUString( lcl_unescapeLineFeeds(
- m_aLine.copy(m_nCharIndex) ),
- RTL_TEXTENCODING_UTF8 ) );
+ OUString::fromUtf8( lcl_unescapeLineFeeds(
+ m_aLine.copy(m_nCharIndex) ) ) );
// name gobbles up rest of line
m_nCharIndex = -1;
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index e2cb968..ba98e80 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -292,7 +292,7 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
if (!rInfo.aModule.isEmpty())
sName = rInfo.aModule + "/" + sName;
SvtViewOptions aWinOpt(E_WINDOW, sName);
- aWinOpt.SetWindowState(OStringToOUString(rInfo.aWinState, RTL_TEXTENCODING_UTF8));
+ aWinOpt.SetWindowState(OUString::fromUtf8(rInfo.aWinState));
::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1);
aSeq[0].Name = "Data";
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index e9cab42..612f985 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -455,7 +455,7 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const vcl::Window* p
while ( pParent )
{
aNewHelpId = pParent->GetHelpId();
- sHelpText = SfxHelp_Impl::GetHelpText( OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName );
+ sHelpText = SfxHelp_Impl::GetHelpText( OUString::fromUtf8(aNewHelpId), sModuleName );
if (!sHelpText.isEmpty())
pParent = NULL;
else
@@ -476,7 +476,7 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const vcl::Window* p
if ( !aNewHelpId.isEmpty() )
{
sHelpText += " - ";
- sHelpText += OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8);
+ sHelpText += OUString::fromUtf8(aNewHelpId);
}
}
@@ -568,7 +568,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
while ( pParent )
{
OString aHelpId = pParent->GetHelpId();
- aHelpURL = CreateHelpURL( OStringToOUString(aHelpId, RTL_TEXTENCODING_UTF8), aHelpModuleName );
+ aHelpURL = CreateHelpURL( OUString::fromUtf8(aHelpId), aHelpModuleName );
if ( !SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
{
break;
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index f8f0e2a..ab4736b 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -730,8 +730,7 @@ static OUString getAutostartDir( bool bCreate = false )
OUString aShortcut;
const char *pConfigHome;
if( (pConfigHome = getenv("XDG_CONFIG_HOME") ) )
- aShortcut = OStringToOUString( OString( pConfigHome ),
- RTL_TEXTENCODING_UTF8 );
+ aShortcut = OUString::fromUtf8( OString( pConfigHome ) );
else
{
OUString aHomeURL;
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index b716f56..a5da0de 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -164,8 +164,7 @@ static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
OUString *pOverrideLabel,
sal_uInt16 nResId, GCallback pFnCallback )
{
- OUString *pURL = new OUString (OStringToOUString( pAsciiURL,
- RTL_TEXTENCODING_UTF8 ));
+ OUString *pURL = new OUString (OUString::fromUtf8( pAsciiURL ));
OString aLabel;
if (pOverrideLabel)
aLabel = OUStringToOString (*pOverrideLabel, RTL_TEXTENCODING_UTF8);
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index e00e6cb..de879ad 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -207,7 +207,7 @@ OUString SfxContentHelper::GetActiveHelpString( const OUString& rURL )
while ( nRead > 0 )
{
OString sOldString( (sal_Char*)lData.getConstArray(), nRead );
- OUString sString = OStringToOUString( sOldString, RTL_TEXTENCODING_UTF8 );
+ OUString sString = OUString::fromUtf8( sOldString );
aRet.append( sString );
nRead = xStream->readBytes( lData, 1024 );
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index 8fcc660..18b9438 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -60,7 +60,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
else if (sTmp == "EndFragment")
nFragEnd = sLine.copy(nIndex).toInt32();
else if (sTmp == "SourceURL")
- sBaseURL = OStringToOUString( sLine.copy(nIndex), RTL_TEXTENCODING_UTF8 );
+ sBaseURL = OUString::fromUtf8( sLine.copy(nIndex) );
if (nEnd >= 0 && nStt >= 0 &&
(!sBaseURL.isEmpty() || rStream.Tell() >= static_cast<sal_Size>(nStt)))
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 8549e9b..1503ed1 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -254,7 +254,7 @@ bool SfxHTMLParser::FinishFileDownload( OUString& rStr )
sal_Size nLen = aStream.Tell();
aStream.Seek( 0 );
OString sBuffer = read_uInt8s_ToOString(aStream, nLen);
- rStr = OStringToOUString( sBuffer, RTL_TEXTENCODING_UTF8 );
+ rStr = OUString::fromUtf8( sBuffer );
}
delete pDLMedium;
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index 4fc4cbf..de7c107 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -59,7 +59,7 @@ OString SfxSlot::GetCommand() const
OUString SfxSlot::GetCommandString() const
{
- return OStringToOUString(GetCommand(), RTL_TEXTENCODING_UTF8);
+ return OUString::fromUtf8(GetCommand());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index b8a3a74..7584592 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -101,7 +101,7 @@ void SfxModalDialog::SetDialogData_Impl()
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list