summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/opengl/oglplayer.cxx2
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx4
-rw-r--r--canvas/workben/canvasdemo.cxx2
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx12
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.cxx3
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx2
-rw-r--r--connectivity/source/drivers/mork/MNSINIParser.cxx3
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx13
-rw-r--r--connectivity/source/parse/sqlflex.l6
-rw-r--r--connectivity/source/parse/sqlnode.cxx6
-rw-r--r--connectivity/workben/iniParser/main.cxx3
-rw-r--r--cppcanvas/qa/extras/emfplus/emfplus.cxx2
-rw-r--r--cui/source/options/personalization.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx3
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx3
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx2
-rw-r--r--desktop/source/lib/init.cxx3
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx4
-rw-r--r--editeng/qa/lookuptree/lookuptree_test.cxx8
-rw-r--r--extensions/source/bibliography/general.cxx4
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx4
-rw-r--r--extensions/source/plugin/aqua/macmgr.mm2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx2
-rw-r--r--extensions/source/propctrlr/pcrcommon.cxx2
-rw-r--r--extensions/source/update/check/download.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx3
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx2
-rw-r--r--forms/source/xforms/submission/submission_get.cxx2
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx2
-rw-r--r--framework/source/helper/persistentwindowstate.cxx5
-rw-r--r--framework/source/inc/pattern/window.hxx2
-rw-r--r--framework/source/layoutmanager/helpers.cxx2
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx2
-rw-r--r--idlc/source/astconstant.cxx4
-rw-r--r--idlc/source/astdump.cxx40
-rw-r--r--idlc/source/astenum.cxx4
-rw-r--r--idlc/source/astinterface.cxx12
-rw-r--r--idlc/source/astoperation.cxx15
-rw-r--r--idlc/source/aststruct.cxx15
-rw-r--r--idlc/source/idlc.cxx2
-rw-r--r--idlc/source/idlccompile.cxx13
-rw-r--r--idlc/source/idlcproduce.cxx6
-rw-r--r--idlc/source/options.cxx2
-rw-r--r--idlc/source/parser.y10
-rw-r--r--include/codemaker/typemanager.hxx2
-rw-r--r--jvmfwk/source/fwkbase.cxx12
-rw-r--r--jvmfwk/source/libxmlutil.cxx2
-rw-r--r--l10ntools/source/localize.cxx6
-rw-r--r--l10ntools/source/pocheck.cxx8
-rw-r--r--l10ntools/source/propmerge.cxx3
-rw-r--r--l10ntools/source/uimerge.cxx2
-rw-r--r--l10ntools/source/xmlparse.cxx4
-rw-r--r--linguistic/source/dicimp.cxx2
-rw-r--r--oox/source/drawingml/customshapepresetdata.cxx6
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.cxx6
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
-rw-r--r--sal/qa/osl/file/osl_File.cxx29
-rw-r--r--sal/rtl/bootstrap.cxx8
-rw-r--r--sax/source/tools/fastattribs.cxx4
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx6
-rw-r--r--sc/source/core/tool/interpr2.cxx2
-rw-r--r--sc/source/core/tool/interpr7.cxx6
-rw-r--r--sc/source/filter/oox/numberformatsbuffer.cxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx2
-rw-r--r--sc/source/ui/miscdlgs/mtrindlg.cxx3
-rw-r--r--sd/source/filter/html/htmlex.cxx2
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx4
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx2
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx5
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx2
-rw-r--r--sdext/source/pdfimport/sax/emitcontext.cxx2
-rw-r--r--sdext/source/pdfimport/tree/style.cxx2
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx10
-rw-r--r--sfx2/source/appl/childwin.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx6
-rw-r--r--sfx2/source/appl/shutdownicon.cxx3
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx3
-rw-r--r--sfx2/source/bastyp/helper.cxx2
-rw-r--r--sfx2/source/bastyp/mieclip.cxx2
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx2
-rw-r--r--sfx2/source/control/msg.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx10
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/dialog/tabdlg.cxx12
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.cxx8
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx3
-rw-r--r--sot/source/sdstor/ucbstorage.cxx2
-rw-r--r--svl/source/misc/lockfilecommon.cxx2
-rw-r--r--svtools/source/contnr/fileview.cxx2
-rw-r--r--svtools/source/control/ctrlbox.cxx3
-rw-r--r--svtools/source/control/headbar.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx4
-rw-r--r--svtools/source/misc/transfer.cxx2
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx3
-rw-r--r--svx/source/gallery2/galini.cxx3
-rw-r--r--svx/source/gallery2/galtheme.cxx2
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--test/source/bootstrapfixture.cxx2
-rw-r--r--testtools/source/bridgetest/multi.cxx4
-rw-r--r--toolkit/source/awt/vclxwindow.cxx2
-rw-r--r--tubes/source/contacts.cxx3
-rw-r--r--ucb/source/ucp/webdav-neon/DAVProperties.cxx6
-rw-r--r--ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx8
-rw-r--r--ucb/source/ucp/webdav-neon/NeonUri.cxx24
-rw-r--r--ucb/source/ucp/webdav/DAVProperties.cxx6
-rw-r--r--ucb/source/ucp/webdav/SerfUri.cxx12
-rw-r--r--unoxml/source/dom/attr.cxx6
-rw-r--r--unoxml/source/dom/characterdata.cxx8
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx16
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx8
-rw-r--r--vcl/generic/fontmanager/helper.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/fixed.cxx2
-rw-r--r--vcl/source/control/fixedhyper.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx4
-rw-r--r--vcl/source/filter/graphicfilter.cxx4
-rw-r--r--vcl/source/gdi/impimagetree.cxx4
-rw-r--r--vcl/source/window/builder.cxx39
-rw-r--r--vcl/source/window/layout.cxx4
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/menuwindow.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/status.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/window.cxx17
-rw-r--r--vcl/source/window/window2.cxx10
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx2
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx2
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx20
-rw-r--r--vcl/unx/gtk/a11y/atktextattributes.cxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx4
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx2
-rw-r--r--writerfilter/source/dmapper/BorderHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/CellColorHandler.cxx8
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
-rw-r--r--writerfilter/source/dmapper/TDefTableHandler.cxx2
-rw-r--r--writerfilter/source/filter/RtfFilter.cxx4
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx6
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx8
154 files changed, 345 insertions, 444 deletions
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 36f5e6874fa0..74f38211e4d0 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 f1381b7ff79c..639c3a79f04b 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 aa484bc2668c..24c1c85ba4e9 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 b8ca6b4675c3..f114e267c343 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 5887635e9841..25bc3859ac55 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 47d3472ca7a6..86a2dc6c7919 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 c53523b5d479..4bc4f316fe0a 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 bbf643c78a7e..59c9cf67db5c 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 8e6a0746383c..084cefd35083 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 c4a239ade780..136734306be7 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 b33baa1e82df..ff8f932ff12b 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 686af4e09148..1fff2cc8b510 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 9b36e68f2fd0..9450a8a2b722 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 17428fd96fe2..e077f8420109 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 330a853c9d75..ae8a1b2db351 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 eb2abedff3d2..c767867cf47e 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 e029b4acc900..f19719d84bfd 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 70ee82795c9f..ac4a6f2f549d 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 5399dab23768..1a9b02e3b1c5 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 c192947b4880..6e9774c72acc 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 5bb7a8d7c443..19abbe0e82bd 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 1f4c2eaae461..0c097fdea1ba 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 3d78dee5f153..693406b0d711 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 42f6b4122bc7..9768a2a5a358 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 1529fb407ae5..e60f36b8311a 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 4af0fe373d02..e5fed36980d0 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 60c53fb16bf6..d23adc16ae64 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 c0d1979a42c4..c64ba81b7565 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 e1a35f41d0ef..ff47330be2b6 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 26a2512774e2..cbb952a78e9e 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 2acd02731973..333a8bcd4c62 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 878571a9377e..c92f4fef92b4 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 34a2dd02f286..fa6f4b0f2ace 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 9292a029a4e8..0cd148e722ca 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 ac0c4b7688e1..647709e84ce0 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 6d2efbad1713..b01880ea704f 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 a6f0089790e5..691036f16967 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 3c497e5e86ff..0a2b5a0d733c 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 486200822d9f..c45f3c947fd6 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 1599447eef8c..f88c620aede1 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 7ff8d45dfaa7..bb5e73581a83 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 ca623fff4730..55e0dcfa408b 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 37e1893c52cd..de9294df51fc 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 b37ff90e6b73..7b9797981e61 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 c9a2c473f3fa..01ca504aaefd 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 1f330b18f780..7332f1c76d32 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 8bd8fb7cbfd9..4f5affb721af 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 5a38c8acbc20..bcc23ec14907 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 482ee73dadfa..b8f0a2e3a264 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 75a71dfa6a6b..b5ed727b9e5a 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 695db41d2097..53fd802fc5f6 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 35a3a20a5517..d7dd9f1c7946 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 dfdb9bd291a9..cf6e46de9150 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 400778026c9c..a9267ac17ad5 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 d9bb4d83d5af..be67e1ab17bc 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 84dcbb5d0eca..48143b3fe100 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 838c73590102..c7ac695a041e 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 5546e9eb5984..5c3f134904ab 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 a1836caf0a7b..e75581d34d6d 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 a41cd154d4c3..25a7b15d6465 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 5954ab17c8d3..34612bffdb29 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 2c376cf8c675..d82d4f30ca42 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 6cd87c239993..a035314fc70b 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 0eadef15cbbc..2edc40c6be99 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 821648d6b542..2069cea03ba1 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 792b64c21c6e..a2cea932bb51 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 b9df2babf467..0ec25cd4a0e6 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 2fa10d6fec22..f8755f4ec8fc 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 fdf44a098dd7..ddb11f93bffa 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 5719ae4301ec..b2ca0a97bcd6 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 e2cbcc677238..e54e2e30873a 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 23db69e7740e..7e54cfcf605f 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 8fa70fb230e2..23c384532034 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 8131a5465d52..66ffd19f80e0 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 d0d3c37d3106..288e9d3ad42f 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 3735f28c82b2..e688a0f293fb 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 c6782d1a25a2..23cb845e5fcc 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 897f26851024..d5d355276f0f 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 0429ecfbe769..506af5bb0c16 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 6a68229968fc..46e0d4a369a2 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 d5bf9663a97c..e3c336f5f6a1 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 7404bbddcfbf..07321bad6e94 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 7607058ddd9a..5fef51293c14 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 0a856ea29de1..c4b91a83a88b 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 4e91dcf26a8c..e5fdf4501c2d 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 79d64fdf1bbf..c6e09609f6ee 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 e2cb96804f0d..ba98e80d29a5 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 e9cab42faad7..612f98531782 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 f8f0e2a42ab1..ab4736b8ef45 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 b716f56d8724..a5da0de290a1 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 e00e6cb266d5..de879ad93d73 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 8fcc660e7618..18b94389a9fb 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 8549e9b7c64a..1503ed1c3f32 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 4fc4cbf18e93..de7c107160f5 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 b8a3a7419596..75845925c128 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -101,7 +101,7 @@ void SfxModalDialog::SetDialogData_Impl()
// save settings (position and user data)
OUString sConfigId;
if (isLayoutEnabled())
- sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8);
+ sConfigId = OUString::fromUtf8(GetHelpId());
else
{
SAL_WARN("sfx.config", "Dialog needs to be converted to .ui format");
@@ -128,7 +128,7 @@ void SfxModalDialog::GetDialogData_Impl()
{
OUString sConfigId;
if (isLayoutEnabled())
- sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8);
+ sConfigId = OUString::fromUtf8(GetHelpId());
else
{
SAL_WARN("sfx.config", "Dialog needs to be converted to .ui format");
@@ -654,8 +654,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl)
pImpl->m_pSfxPage->FillUserData();
OUString sData( pImpl->m_pSfxPage->GetUserData() );
- OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(),
- RTL_TEXTENCODING_UTF8);
+ OUString sConfigId = OUString::fromUtf8(pImpl->m_pSfxPage->GetConfigId());
if (sConfigId.isEmpty())
{
SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
@@ -724,8 +723,7 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage,
if ( pImpl->m_pSfxPage )
{
// First obtain the user data, only then Reset()
- OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(),
- RTL_TEXTENCODING_UTF8);
+ OUString sConfigId = OUString::fromUtf8(pImpl->m_pSfxPage->GetConfigId());
if (sConfigId.isEmpty())
{
SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 18da893e5823..25d91ae3d4b1 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -271,7 +271,7 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
OUString aHelpText;
Help* pHelp = Application::GetHelp();
if ( pHelp )
- aHelpText = pHelp->GetHelpText( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), NULL );
+ aHelpText = pHelp->GetHelpText( OUString::fromUtf8(sHelpId), NULL );
return aHelpText;
}
@@ -1143,7 +1143,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
{
while ( *_pControlId )
{
- DBG_ASSERT( INetURLObject( OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
+ DBG_ASSERT( INetURLObject( OUString::fromUtf8( *_pHelpId ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
OUString sId( sHelpIdPrefix );
sId += OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 );
xControlAccess->setValue( *_pControlId, ControlActions::SET_HELP_URL, makeAny( sId ) );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 34338673e9ba..d71f62d466ba 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -377,8 +377,7 @@ SfxTabDialog::~SfxTabDialog()
if ( !aPageData.isEmpty() )
{
// save settings of all pages (user data)
- OUString sConfigId = OStringToOUString(pDataObject->pTabPage->GetConfigId(),
- RTL_TEXTENCODING_UTF8);
+ OUString sConfigId = OUString::fromUtf8(pDataObject->pTabPage->GetConfigId());
if (sConfigId.isEmpty())
{
SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
@@ -555,7 +554,7 @@ void SfxTabDialog::Start_Impl()
sal_uInt16 nActPage = m_pTabCtrl->GetPageId( 0 );
// load old settings, when exists
- SvtViewOptions aDlgOpt(E_TABDIALOG, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
+ SvtViewOptions aDlgOpt(E_TABDIALOG, OUString::fromUtf8(GetHelpId()));
if ( aDlgOpt.Exists() )
{
SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
@@ -674,8 +673,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
if ( !aPageData.isEmpty() )
{
// save settings of this page (user data)
- OUString sConfigId = OStringToOUString(pDataObject->pTabPage->GetConfigId(),
- RTL_TEXTENCODING_UTF8);
+ OUString sConfigId = OUString::fromUtf8(pDataObject->pTabPage->GetConfigId());
if (sConfigId.isEmpty())
{
SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
@@ -758,7 +756,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
void SfxTabDialog::SavePosAndId()
{
// 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));
// to-do replace with name of page when all pages are converted to .ui
aDlgOpt.SetPageID( m_pTabCtrl->GetCurPageId() );
@@ -1127,7 +1125,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
DBG_ASSERT( NULL == pDataObject->pTabPage, "create TabPage more than once" );
pDataObject->pTabPage = pTabPage;
- OUString sConfigId = OStringToOUString(pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
+ OUString sConfigId = OUString::fromUtf8(pTabPage->GetConfigId());
if (sConfigId.isEmpty())
{
SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx
index 371b76603043..d3e3b0b977b0 100644
--- a/shell/source/backends/gconfbe/gconfaccess.cxx
+++ b/shell/source/backends/gconfbe/gconfaccess.cxx
@@ -204,8 +204,8 @@ uno::Any makeAnyOfGconfValue( GConfValue *pGconfValue )
return uno::makeAny( (sal_Int32) gconf_value_get_int( pGconfValue ) );
case GCONF_VALUE_STRING:
- return uno::makeAny( OStringToOUString( OString(
- gconf_value_get_string(pGconfValue) ), RTL_TEXTENCODING_UTF8 ) );
+ return uno::makeAny( OUString::fromUtf8( OString(
+ gconf_value_get_string(pGconfValue) ) ) );
default:
fprintf( stderr, "makeAnyOfGconfValue: Type not handled.\n" );
@@ -230,7 +230,7 @@ static void splitFontName( GConfValue *pGconfValue, OUString &rName, sal_Int16 &
rHeight = static_cast<sal_Int16>( aSize.toInt32() );
}
- rName = OStringToOUString( aFont.copy( 0, nIdx ), RTL_TEXTENCODING_UTF8 );
+ rName = OUString::fromUtf8( aFont.copy( 0, nIdx ) );
}
@@ -265,7 +265,7 @@ uno::Any translateToOOo( const ConfigurationValue &rValue, GConfValue *pGconfVal
}
// Remove trailing ";"
aBuffer.setLength(aBuffer.getLength()-1);
- return uno::makeAny(OStringToOUString(aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ return uno::makeAny(OUString::fromUtf8(aBuffer.makeStringAndClear()));
}
else
g_warning( "unexpected type for ignore_hosts" );
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index bb08e4d68ceb..538bec8747bb 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -306,8 +306,7 @@ void add_group_entries(
key_value_utf8 = comphelper::string::strip(key_value_utf8, '\"');
- OUString key_value_utf16 =
- OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8);
+ OUString key_value_utf16 = OUString::fromUtf8(key_value_utf8);
Substitutor.add_substitution(
GroupName.getStr(), make_winrc_unicode_string(key_value_utf16));
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 6f66c25b7621..21119b34ac8d 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -3167,7 +3167,7 @@ OUString UCBStorage::GetLinkedFile( SvStream &rStream )
OString aTmp = read_uInt16_lenPrefixed_uInt8s_ToOString(rStream);
if (aTmp.match("ContentURL="))
{
- aString = OStringToOUString(aTmp.copy(11), RTL_TEXTENCODING_UTF8);
+ aString = OUString::fromUtf8(aTmp.copy(11));
}
}
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index ea0a5965649f..6ae8ec14c3de 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -165,7 +165,7 @@ OUString LockFileCommon::ParseName( const uno::Sequence< sal_Int8 >& aBuffer, sa
}
}
- return OStringToOUString( aResult.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
+ return OUString::fromUtf8( aResult.makeStringAndClear() );
}
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 974ac7a20079..509fea1fe4c8 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -279,7 +279,7 @@ public:
inline NameTranslationEntry::NameTranslationEntry( const OString& rOrg, const OString& rTrans )
: HashedEntry(OStringToOUString(rOrg, RTL_TEXTENCODING_ASCII_US))
- , maTranslatedName(OStringToOUString(rTrans, RTL_TEXTENCODING_UTF8))
+ , maTranslatedName(OUString::fromUtf8(rTrans))
{
}
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index c83db0b4a1d5..191d06c943e0 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1018,8 +1018,7 @@ void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unico
OString aLine;
aStream.ReadLine( aLine );
- OUString aEntries = OStringToOUString(aLine,
- RTL_TEXTENCODING_UTF8);
+ OUString aEntries = OUString::fromUtf8(aLine);
SetMRUEntries( aEntries, cSep );
}
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 490ad89bcbf0..139b8f81f9ff 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -1145,7 +1145,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
+ OUString aHelpId( OUString::fromUtf8( GetHelpId( nItemId ) ) );
if ( !aHelpId.isEmpty() )
{
// display it if help is available
@@ -1473,7 +1473,7 @@ OUString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
}
return pItem->maHelpText;
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2e8fa764f6b8..15740f92df69 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1509,7 +1509,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
+ OUString aHelpId( OUString::fromUtf8( GetHelpId( nItemId ) ) );
if ( !aHelpId.isEmpty() )
{
// trigger Help if available
@@ -2429,7 +2429,7 @@ OUString TabBar::GetHelpText( sal_uInt16 nPageId ) const
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
}
return pItem->maHelpText;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 7bf8f637dfba..add32b0ece53 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -2119,7 +2119,7 @@ bool TransferableDataHelper::GetFileList(
while( xStm->ReadLine( aDiskString ) )
if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
- rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
+ rFileList.AppendFile( OUString::fromUtf8(aDiskString) );
bRet = true;
}
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index c36ccbc33cf3..c37a71774abd 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -258,8 +258,7 @@ namespace {
static OUString lcl_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/svx/source/gallery2/galini.cxx b/svx/source/gallery2/galini.cxx
index b4c53388cf1c..5c5de4d58b65 100644
--- a/svx/source/gallery2/galini.cxx
+++ b/svx/source/gallery2/galini.cxx
@@ -57,8 +57,7 @@ OUString GalleryThemeEntry::ReadStrFromIni(const OUString &aKeyName )
{
aKey = OStringToOUString(
aLine.copy( 0, n ).trim(), RTL_TEXTENCODING_ASCII_US );
- aValue = OStringToOUString(
- aLine.copy( n + 1 ).trim(), RTL_TEXTENCODING_UTF8 );
+ aValue = OUString::fromUtf8( aLine.copy( n + 1 ).trim() );
if( ( n = aKey.indexOf( '[' ) ) >= 1 )
{
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index cf644489752f..8caa580b7acf 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -711,7 +711,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bo
sal_uInt32 nThemeId = 0;
OString aTmpStr = read_uInt16_lenPrefixed_uInt8s_ToOString(*pIStm);
- aThemeName = OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8);
+ aThemeName = OUString::fromUtf8(aTmpStr);
// execute a charakter conversion
if( nVersion >= 0x0004 )
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index 7f4925b22e51..f0cb73507218 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -106,7 +106,7 @@ IMPL_LINK(InsertPropertyPanel, WindowEventListener, VclSimpleEvent*, pEvent)
return 1;
// Extract name of (sub)toolbar from help id.
- OUString sToolbarName (rtl::OStringToOUString(pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8));
+ OUString sToolbarName (rtl::OUString::fromUtf8(pToolBox->GetHelpId()));
if (sToolbarName.getLength() == 0)
return 1;
const util::URL aURL (sfx2::sidebar::Tools::GetURL(sToolbarName));
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2c508672f1f5..ba45f4cba5e9 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2252,7 +2252,7 @@ bool DocxAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarge
std::vector<OString>& rNames = it->second;
if (rNames.size() > nIndex)
// We know the bookmark name for this sequence and this index, do the replacement.
- sMark = OStringToOUString(rNames[nIndex], RTL_TEXTENCODING_UTF8);
+ sMark = OUString::fromUtf8(rNames[nIndex]);
}
}
}
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index fe0a1ea81f2e..2ddf80f64201 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -175,7 +175,7 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
RTL_TEXTENCODING_UTF8).getStr(), 0, returnValue);
OString aContentString = loadFile(aOutput.GetURL());
- OUString aContentOUString = OStringToOUString(aContentString, RTL_TEXTENCODING_UTF8);
+ OUString aContentOUString = OUString::fromUtf8(aContentString);
if( eFormat == test::OOXML && !aContentOUString.isEmpty() )
{
diff --git a/testtools/source/bridgetest/multi.cxx b/testtools/source/bridgetest/multi.cxx
index 0c20128345a0..256247433bc6 100644
--- a/testtools/source/bridgetest/multi.cxx
+++ b/testtools/source/bridgetest/multi.cxx
@@ -46,9 +46,7 @@ template< typename T > void checkEqual(T const & value, T const & argument) {
if (argument != value) {
std::ostringstream s;
s << value << " != " << argument;
- throw CheckFailed(
- OStringToOUString(
- OString(s.str().c_str()), RTL_TEXTENCODING_UTF8));
+ throw CheckFailed( OUString::fromUtf8(OString(s.str().c_str())) );
}
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index f7d7b419154b..476c1fa7f1c5 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1993,7 +1993,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
break;
case BASEPROPERTY_HELPURL:
{
- OUString aHelpId( OStringToOUString( GetWindow()->GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ OUString aHelpId( OUString::fromUtf8( GetWindow()->GetHelpId() ) );
aProp <<= OUString( aHelpId );
}
break;
diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx
index df9900565dd8..867a9c95d3cb 100644
--- a/tubes/source/contacts.cxx
+++ b/tubes/source/contacts.cxx
@@ -128,8 +128,7 @@ public:
static OUString fromUTF8( const char *pStr )
{
- return OStringToOUString( OString( pStr, strlen( pStr ) ),
- RTL_TEXTENCODING_UTF8 );
+ return OUString::fromUtf8( OString( pStr, strlen( pStr ) ) );
}
void Populate()
diff --git a/ucb/source/ucp/webdav-neon/DAVProperties.cxx b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
index 5d5634936dca..09960488ac89 100644
--- a/ucb/source/ucp/webdav-neon/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
@@ -108,10 +108,8 @@ void DAVProperties::createUCBPropName( const char * nspace,
const char * name,
OUString & rFullName )
{
- OUString aNameSpace
- = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 );
- OUString aName
- = OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
+ OUString aNameSpace = OUString::fromUtf8( nspace );
+ OUString aName = OUString::fromUtf8( name );
if ( aNameSpace.isEmpty() )
{
diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
index 73b6c7c5df32..f4a58ccb5def 100644
--- a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
@@ -175,7 +175,7 @@ extern "C" int NPFR_propfind_iter( void* userdata,
else
{
thePropertyValue.Value
- <<= OStringToOUString( value, RTL_TEXTENCODING_UTF8 );
+ <<= OUString::fromUtf8( value );
}
}
@@ -192,8 +192,7 @@ extern "C" void NPFR_propfind_results( void* userdata,
{
// @@@ href is not the uri! DAVResource ctor wants uri!
- DAVResource theResource(
- OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) );
+ DAVResource theResource( OUString::fromUtf8( uri->path ) );
ne_propset_iterate( set, NPFR_propfind_iter, &theResource );
@@ -224,8 +223,7 @@ extern "C" void NPFR_propnames_results( void* userdata,
{
// @@@ href is not the uri! DAVResourceInfo ctor wants uri!
// Create entry for the resource.
- DAVResourceInfo theResource(
- OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) );
+ DAVResourceInfo theResource( OUString::fromUtf8( uri->path ) );
// Fill entry.
ne_propset_iterate( results, NPFR_propnames_iter, &theResource );
diff --git a/ucb/source/ucp/webdav-neon/NeonUri.cxx b/ucb/source/ucp/webdav-neon/NeonUri.cxx
index d378cfb46ddf..bec91bcb8759 100644
--- a/ucb/source/ucp/webdav-neon/NeonUri.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx
@@ -124,28 +124,24 @@ void NeonUri::init( const OString & rUri, const ne_uri * pUri )
&g_sUriDefaultsHTTPS :
&g_sUriDefaultsHTTP;
- mScheme = OStringToOUString(
- pUri->scheme ? pUri->scheme : pUriDefs->scheme,
- RTL_TEXTENCODING_UTF8 );
- mUserInfo = OStringToOUString(
- pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo,
- RTL_TEXTENCODING_UTF8 );
- mHostName = OStringToOUString(
- pUri->host ? pUri->host : pUriDefs->host,
- RTL_TEXTENCODING_UTF8 );
+ mScheme = OUString::fromUtf8(
+ pUri->scheme ? pUri->scheme : pUriDefs->scheme);
+ mUserInfo = OUString::fromUtf8(
+ pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo);
+ mHostName = OUString::fromUtf8(
+ pUri->host ? pUri->host : pUriDefs->host);
mPort = pUri->port > 0 ? pUri->port : pUriDefs->port;
- mPath = OStringToOUString(
- pUri->path ? pUri->path : pUriDefs->path,
- RTL_TEXTENCODING_UTF8 );
+ mPath = OUString::fromUtf8(
+ pUri->path ? pUri->path : pUriDefs->path);
if ( pUri->query )
{
- mPath += "?" + OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 );
+ mPath += "?" + OUString::fromUtf8( pUri->query );
}
if ( pUri->fragment )
{
- mPath += "#" + OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 );
+ mPath += "#" + OUString::fromUtf8( pUri->fragment );
}
}
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 34537d29e663..4162f4f6db09 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -113,10 +113,8 @@ void DAVProperties::createUCBPropName( const char * nspace,
const char * name,
OUString & rFullName )
{
- OUString aNameSpace
- = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 );
- OUString aName
- = OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
+ OUString aNameSpace = OUString::fromUtf8( nspace );
+ OUString aName = OUString::fromUtf8( name );
if ( !aNameSpace.getLength() )
{
diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index df299338667e..5c44cca7f200 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -93,22 +93,22 @@ SerfUri::SerfUri( const OUString & inUri )
void SerfUri::init( const apr_uri_t * pUri )
{
- mScheme = OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 );
- mUserInfo = OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 );
- mHostName = OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 );
+ mScheme = OUString::fromUtf8( pUri->scheme );
+ mUserInfo = OUString::fromUtf8( pUri->user );
+ mHostName = OUString::fromUtf8( pUri->hostname );
mPort = pUri->port;
- mPath = OStringToOUString( pUri->path, RTL_TEXTENCODING_UTF8 );
+ mPath = OUString::fromUtf8( pUri->path );
if ( pUri->query )
{
mPath += "?";
- mPath += OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 );
+ mPath += OUString::fromUtf8( pUri->query );
}
if ( pUri->fragment )
{
mPath += "#";
- mPath += OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 );
+ mPath += OUString::fromUtf8( pUri->fragment );
}
}
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
index 68c5c82a4e6b..f835e6dab6de 100644
--- a/unoxml/source/dom/attr.cxx
+++ b/unoxml/source/dom/attr.cxx
@@ -238,8 +238,7 @@ namespace DOM
if (m_pNamespace.get()) {
OSL_ASSERT(!m_aNodePtr->parent);
- OUString const ret(OStringToOUString(
- m_pNamespace->second, RTL_TEXTENCODING_UTF8));
+ OUString const ret(OUString::fromUtf8(m_pNamespace->second));
return ret;
} else {
return CNode::getPrefix();
@@ -255,8 +254,7 @@ namespace DOM
if (m_pNamespace.get()) {
OSL_ASSERT(!m_aNodePtr->parent);
- OUString const ret(OStringToOUString(
- m_pNamespace->first, RTL_TEXTENCODING_UTF8));
+ OUString const ret(OUString::fromUtf8(m_pNamespace->first));
return ret;
} else {
return CNode::getNamespaceURI();
diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx
index 1033a7c9aabf..9f5888dba942 100644
--- a/unoxml/source/dom/characterdata.cxx
+++ b/unoxml/source/dom/characterdata.cxx
@@ -88,7 +88,7 @@ namespace DOM
::boost::shared_ptr<xmlChar const> const pContent(
xmlNodeGetContent(m_aNodePtr), xmlFree);
OString aData(reinterpret_cast<sal_Char const*>(pContent.get()));
- OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
+ OUString tmp(OUString::fromUtf8(aData));
if (offset > tmp.getLength() || offset < 0 || count < 0) {
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
@@ -159,7 +159,7 @@ namespace DOM
::boost::shared_ptr<xmlChar const> const pContent(
xmlNodeGetContent(m_aNodePtr), xmlFree);
OString aData(reinterpret_cast<sal_Char const*>(pContent.get()));
- OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
+ OUString tmp(OUString::fromUtf8(aData));
if (offset > tmp.getLength() || offset < 0) {
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
@@ -194,7 +194,7 @@ namespace DOM
::boost::shared_ptr<xmlChar const> const pContent(
xmlNodeGetContent(m_aNodePtr), xmlFree);
OString aData(reinterpret_cast<sal_Char const*>(pContent.get()));
- OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
+ OUString tmp(OUString::fromUtf8(aData));
if (offset > tmp.getLength() || offset < 0 || count < 0){
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
@@ -249,7 +249,7 @@ namespace DOM
::boost::shared_ptr<xmlChar const> const pContent(
xmlNodeGetContent(m_aNodePtr), xmlFree);
OString aData(reinterpret_cast<sal_Char const*>(pContent.get()));
- OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
+ OUString tmp(OUString::fromUtf8(aData));
if (offset > tmp.getLength() || offset < 0 || count < 0) {
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 1bec82992295..0013f400b98d 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -2319,9 +2319,7 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const
"librdf_TypeConverter::convertToXURI: "
"librdf_uri_as_string failed", m_rRep);
}
- OUString uriU( OStringToOUString(
- OString(reinterpret_cast<const sal_Char*>(uri)),
- RTL_TEXTENCODING_UTF8) );
+ OUString uriU( OUString::fromUtf8( OString(reinterpret_cast<const sal_Char*>(uri))) );
try {
return rdf::URI::create(m_xContext, uriU);
} catch (const lang::IllegalArgumentException & iae) {
@@ -2360,9 +2358,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
"librdf_TypeConverter::convertToXResource: "
"blank node has no label", m_rRep);
}
- OUString labelU( OStringToOUString(
- OString(reinterpret_cast<const sal_Char*>(label)),
- RTL_TEXTENCODING_UTF8) );
+ OUString labelU( OUString::fromUtf8( OString(reinterpret_cast<const sal_Char*>(label))) );
try {
return uno::Reference<rdf::XResource>(
rdf::BlankNode::create(m_xContext, labelU), uno::UNO_QUERY);
@@ -2395,13 +2391,9 @@ librdf_TypeConverter::convertToXNode(librdf_node* i_pNode) const
librdf_uri* pType(
librdf_node_get_literal_value_datatype_uri(i_pNode) );
OSL_ENSURE(!lang || !pType, "convertToXNode: invalid literal");
- const OUString valueU( OStringToOUString(
- OString(reinterpret_cast<const sal_Char*>(value)),
- RTL_TEXTENCODING_UTF8) );
+ const OUString valueU( OUString::fromUtf8(OString(reinterpret_cast<const sal_Char*>(value))) );
if (lang) {
- const OUString langU( OStringToOUString(
- OString(reinterpret_cast<const sal_Char*>(lang)),
- RTL_TEXTENCODING_UTF8) );
+ const OUString langU( OUString::fromUtf8( OString(reinterpret_cast<const sal_Char*>(lang))) );
return uno::Reference<rdf::XNode>(
rdf::Literal::createWithLanguage(m_xContext, valueU, langU),
uno::UNO_QUERY);
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 1a9dd396fe4c..73fb00e5d44f 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -577,7 +577,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
continue;
}
- int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( OString( (sal_Char*)family ), RTL_TEXTENCODING_UTF8 ), true );
+ int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OUString::fromUtf8( OString( (sal_Char*)family ) ), true );
PrintFont* pUpdate = aFonts.front();
std::list<PrintFont*>::const_iterator second_font = aFonts.begin();
++second_font;
@@ -630,7 +630,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int,
pUpdate->m_eItalic = convertSlant(slant);
if( eStyleRes == FcResultMatch )
{
- pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 );
+ pUpdate->m_aStyleName = OUString::fromUtf8( OString( (sal_Char*)style ) );
}
// update font cache
@@ -877,7 +877,7 @@ namespace
const char* pScriptCode = uscript_getShortName(eScript);
if (pScriptCode)
aBuf.append('-').append(pScriptCode);
- return LanguageTag(OStringToOUString(aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ return LanguageTag(OUString::fromUtf8(aBuf.makeStringAndClear()));
}
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
@@ -1056,7 +1056,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
rWrapper.m_aFontNameToLocalized.find(sFamily);
if (aI != rWrapper.m_aFontNameToLocalized.end())
sFamily = aI->second;
- rPattern.maSearchName = OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 );
+ rPattern.maSearchName = OUString::fromUtf8( sFamily );
bRet = true;
}
}
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index 3a313190ea80..da8e2a55a477 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -163,7 +163,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
#ifdef SYSTEM_PPD_DIR
if( pSubDir && rtl_str_compare( pSubDir, PRINTER_PPDDIR ) == 0 )
{
- rPathList.push_back( OStringToOUString( OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) );
+ rPathList.push_back( OUString::fromUtf8( OString( SYSTEM_PPD_DIR ) ) );
}
#endif
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index ffe94bfd11c2..cfc2ca735d90 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -231,7 +231,7 @@ bool Edit::set_property(const OString &rKey, const OString &rValue)
SetStyle(nBits);
}
else if (rKey == "placeholder-text")
- SetPlaceholderText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ SetPlaceholderText(OUString::fromUtf8(rValue));
else
return Control::set_property(rKey, rValue);
return true;
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index a0d3da11eccd..d86356e056ff 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -1049,7 +1049,7 @@ Image FixedImage::loadThemeImage(const OString &rFileName)
static ImplImageTreeSingletonRef aImageTree;
OUString sIconTheme =
Application::GetSettings().GetStyleSettings().DetermineIconTheme();
- const OUString sFileName(OStringToOUString(rFileName, RTL_TEXTENCODING_UTF8));
+ const OUString sFileName(OUString::fromUtf8(rFileName));
BitmapEx aBitmap;
bool bSuccess = aImageTree->loadImage(sFileName, sIconTheme, aBitmap, true);
SAL_WARN_IF(!bSuccess, "vcl.layout", "Unable to load " << sFileName
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 6926a0c843c6..701c529985cf 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -134,7 +134,7 @@ void FixedHyperlink::SetText(const OUString& rNewDescription)
bool FixedHyperlink::set_property(const OString &rKey, const OString &rValue)
{
if (rKey == "uri")
- SetURL(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ SetURL(OUString::fromUtf8(rValue));
else
return FixedText::set_property(rKey, rValue);
return true;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 8c58442ba063..11d2b9f2e156 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1366,7 +1366,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
+ OUString aHelpId( OUString::fromUtf8( GetHelpId( nItemId ) ) );
if ( !aHelpId.isEmpty() )
{
// call Help if existing
@@ -1962,7 +1962,7 @@ const OUString& TabControl::GetHelpText( sal_uInt16 nPageId ) const
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
}
return pItem->maHelpText;
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index b7d046686b5d..243668edbcf0 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -2199,14 +2199,14 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData )
if( GRAPHIC_NONE == pData->maGraphic.GetType() || pData->maGraphic.GetContext() ) // Import
{
// Import
- nFormat = GetImportFormatNumberForShortName( OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) );
+ nFormat = GetImportFormatNumberForShortName( OUString::fromUtf8( aShortName) );
nRet = ImportGraphic( pData->maGraphic, OUString(), pData->mrStm, nFormat ) == 0;
}
#ifndef DISABLE_EXPORT
else if( !aShortName.isEmpty() )
{
// Export
- nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) );
+ nFormat = GetExportFormatNumberForShortName( OUString::fromUtf8(aShortName) );
nRet = ExportGraphic( pData->maGraphic, OUString(), pData->mrStm, nFormat ) == 0;
}
#endif
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index e81bafe54269..e803b00d54da 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -326,8 +326,8 @@ void ImplImageTree::parseLinkFile(boost::shared_ptr< SvStream > pStream)
continue;
sal_Int32 nIndex = 0;
- aLink = OStringToOUString( aLine.getToken(0, ' ', nIndex), RTL_TEXTENCODING_UTF8 );
- aOriginal = OStringToOUString( aLine.getToken(0, ' ', nIndex), RTL_TEXTENCODING_UTF8 );
+ aLink = OUString::fromUtf8( aLine.getToken(0, ' ', nIndex) );
+ aOriginal = OUString::fromUtf8( aLine.getToken(0, ' ', nIndex) );
// skip comments, or incomplete entries
if (aLink.isEmpty() || aLink[0] == '#' || aOriginal.isEmpty())
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 9431819075b7..71531495ac00 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -833,7 +833,7 @@ namespace
if (!rFrame.is())
return;
- OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
+ OUString aCommand(OUString::fromUtf8(extractActionName(rMap)));
if (aCommand.isEmpty())
return;
@@ -1393,7 +1393,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
MetricField *pField = new MetricField(pParent, nBits);
pField->SetUnit(eUnit);
if (eUnit == FUNIT_CUSTOM)
- pField->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
+ pField->SetCustomUnitText(OUString::fromUtf8(sUnit));
pWindow = pField;
}
}
@@ -1427,7 +1427,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
pBox->SetUnit(eUnit);
pBox->SetDecimalDigits(extractDecimalDigits(sPattern));
if (eUnit == FUNIT_CUSTOM)
- pBox->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
+ pBox->SetCustomUnitText(OUString::fromUtf8(sUnit));
pWindow = pBox;
}
else if (extractEntry(rMap))
@@ -1438,7 +1438,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
{
sal_uInt16 nActiveId = extractActive(rMap);
for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
- pComboBox->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
+ pComboBox->InsertEntry(OUString::fromUtf8(*aI));
if (nActiveId < rItems.size())
pComboBox->SelectEntryPos(nActiveId);
}
@@ -1452,7 +1452,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
{
sal_uInt16 nActiveId = extractActive(rMap);
for (std::vector<OString>::const_iterator aI = rItems.begin(), aEnd = rItems.end(); aI != aEnd; ++aI)
- pListBox->InsertEntry(OStringToOUString(*aI, RTL_TEXTENCODING_UTF8));
+ pListBox->InsertEntry(OUString::fromUtf8(*aI));
if (nActiveId < rItems.size())
pListBox->SelectEntryPos(nActiveId);
}
@@ -1483,7 +1483,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
pBox->SetUnit(eUnit);
pBox->SetDecimalDigits(extractDecimalDigits(sPattern));
if (eUnit == FUNIT_CUSTOM)
- pBox->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
+ pBox->SetCustomUnitText(OUString::fromUtf8(sUnit));
pWindow = pBox;
}
else
@@ -1617,7 +1617,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
ToolBox *pToolBox = dynamic_cast<ToolBox*>(pParent);
if (pToolBox)
{
- OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
+ OUString aCommand(OUString::fromUtf8(extractActionName(rMap)));
sal_uInt16 nItemId = 0;
ToolBoxItemBits nBits = ToolBoxItemBits::NONE;
@@ -1634,14 +1634,14 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
const sal_uInt16 COMMAND_ITEMID_START = 30000;
nItemId = COMMAND_ITEMID_START + pToolBox->GetItemCount();
pToolBox->InsertItem(nItemId,
- OStringToOUString(extractLabel(rMap), RTL_TEXTENCODING_UTF8), nBits);
+ OUString::fromUtf8(extractLabel(rMap)), nBits);
pToolBox->SetItemCommand(nItemId, aCommand);
pToolBox->SetHelpId(nItemId, m_sHelpRoot + id);
}
OString sTooltip(extractTooltipText(rMap));
if (!sTooltip.isEmpty())
- pToolBox->SetQuickHelpText(nItemId, OStringToOUString(sTooltip, RTL_TEXTENCODING_UTF8));
+ pToolBox->SetQuickHelpText(nItemId, OUString::fromUtf8(sTooltip));
OString sIconName(extractIconName(rMap));
if (!sIconName.isEmpty())
@@ -1679,10 +1679,10 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
#ifdef SAL_DLLPREFIX
sModuleBuf.append(SAL_DLLPREFIX);
#endif
- sModuleBuf.append(OStringToOUString(name.copy(0, nDelim), RTL_TEXTENCODING_UTF8));
+ sModuleBuf.append(OUString::fromUtf8(name.copy(0, nDelim)));
sModuleBuf.append(SAL_DLLEXTENSION);
#endif
- OUString sFunction(OStringToOUString(OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8));
+ OUString sFunction(OUString::fromUtf8(OString("make") + name.copy(nDelim+1)));
#ifndef DISABLE_DYNLOADING
OUString sModule = sModuleBuf.makeStringAndClear();
ModuleMap::iterator aI = m_aModuleMap.find(sModule);
@@ -1886,8 +1886,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
if (aFind != aProperties.end())
{
sal_uInt16 nPageId = pTabControl->GetCurPageId();
- pTabControl->SetPageText(nPageId,
- OStringToOUString(aFind->second, RTL_TEXTENCODING_UTF8));
+ pTabControl->SetPageText(nPageId, OUString::fromUtf8(aFind->second));
pTabControl->SetPageName(nPageId, sID);
}
else
@@ -2447,7 +2446,7 @@ std::vector<OString> VclBuilder::handleItems(xmlreader::XmlReader &reader, const
if (m_pStringReplace)
{
- OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8));
+ OUString sTmp = (*m_pStringReplace)(OUString::fromUtf8(sValue));
sValue = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8);
}
@@ -2711,7 +2710,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con
if (rClass == "GtkMenuItem")
{
- OUString sLabel(OStringToOUString(convertMnemonicMarkup(extractLabel(rProps)), RTL_TEXTENCODING_UTF8));
+ OUString sLabel(OUString::fromUtf8(convertMnemonicMarkup(extractLabel(rProps))));
pParent->InsertItem(nNewId, sLabel, MenuItemBits::TEXT, rID);
}
else if (rClass == "GtkSeparatorMenuItem")
@@ -2731,9 +2730,9 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con
const OString &rValue = aI->second;
if (rKey == "tooltip-markup")
- pParent->SetTipHelpText(nNewId, OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ pParent->SetTipHelpText(nNewId, OUString::fromUtf8(rValue));
else if (rKey == "tooltip-text")
- pParent->SetTipHelpText(nNewId, OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ pParent->SetTipHelpText(nNewId, OUString::fromUtf8(rValue));
else if (rKey == "visible")
pParent->ShowItem(nNewId, toBool(rValue));
else if (rKey == "has-default" && toBool(rValue))
@@ -3063,7 +3062,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI
sProperty = sProperty.replace('_', '-');
if (m_pStringReplace)
{
- OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8));
+ OUString sTmp = (*m_pStringReplace)(OUString::fromUtf8(sValue));
rMap[sProperty] = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8);
}
else
@@ -3291,7 +3290,7 @@ void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt1
aI != aEnd; ++aI)
{
const ListStore::row &rRow = *aI;
- sal_uInt16 nEntry = rTarget.InsertEntry(OStringToOUString(rRow[0], RTL_TEXTENCODING_UTF8));
+ sal_uInt16 nEntry = rTarget.InsertEntry(OUString::fromUtf8(rRow[0]));
if (rRow.size() > 1)
{
sal_IntPtr nValue = rRow[1].toInt32();
@@ -3434,7 +3433,7 @@ void VclBuilder::mungeTextBuffer(VclMultiLineEdit &rTarget, const TextBuffer &rT
const OString &rValue = aI->second;
if (rKey == "text")
- rTarget.SetText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ rTarget.SetText(OUString::fromUtf8(rValue));
else
{
SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 590525fe3b4d..2a56ca99c00a 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2220,9 +2220,9 @@ OUString MessageDialog::get_secondary_text() const
bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
{
if (rKey == "text")
- set_primary_text(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ set_primary_text(OUString::fromUtf8(rValue));
else if (rKey == "secondary-text")
- set_secondary_text(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ set_secondary_text(OUString::fromUtf8(rValue));
else if (rKey == "message-type")
{
VclMessageType eMode = VCL_MESSAGE_INFO;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 546725aed72b..03ca36f214d6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1182,7 +1182,7 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
if (!pData->aCommandStr.isEmpty())
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
if (pData->aHelpText.isEmpty() && !pData->aHelpId.isEmpty())
- pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
+ pData->aHelpText = pHelp->GetHelpText( OUString::fromUtf8( pData->aHelpId ), NULL );
}
}
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index ddfe6bffbc97..88b0e8ab159c 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -151,7 +151,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
if ( !aCommand.isEmpty() )
pHelp->Start( aCommand, NULL );
else
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
+ pHelp->Start( OUString::fromUtf8( aHelpId ), NULL );
}
bDone = true;
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 715e75e2909d..4acd97de0e8a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -775,7 +775,7 @@ void PrintDialog::storeToSettings()
mpTabCtrl->GetPageText( mpTabCtrl->GetCurPageId() ) );
pItem->setValue( OUString( "PrintDialog" ),
OUString( "WindowState" ),
- OStringToOUString( GetWindowState(), RTL_TEXTENCODING_UTF8 )
+ OUString::fromUtf8( GetWindowState() )
);
pItem->Commit();
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c4ccf055f433..ad9e04dacc8b 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -800,7 +800,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
if ( !aCommand.isEmpty() )
pHelp->Start( aCommand, this );
else if ( !aHelpId.isEmpty() )
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pHelp->Start( OUString::fromUtf8( aHelpId ), this );
}
return;
}
@@ -1263,7 +1263,7 @@ const OUString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const
if ( !pItem->maCommand.isEmpty() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this );
if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
- pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
}
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 4fc17254545b..33402393a4ac 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4182,7 +4182,7 @@ const OUString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pItem->maCommandStr.getLength() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommandStr, this );
if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
- pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pItem->maHelpText = pHelp->GetHelpText( OUString::fromUtf8( pItem->maHelpId ), this );
}
}
@@ -4254,7 +4254,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
if ( !aCommand.isEmpty() )
pHelp->Start( aCommand, this );
else if ( !aHelpId.isEmpty() )
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
+ pHelp->Start( OUString::fromUtf8( aHelpId ), this );
}
return;
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index b4468848ef20..adfde5afb448 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -273,8 +273,7 @@ Window::~Window()
aTempStr.append(aErrorStr.toString());
OSL_FAIL(aTempStr.getStr());
// abort in debug builds, must be fixed!
- Application::Abort(OStringToOUString(
- aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear()));
}
}
@@ -296,7 +295,7 @@ Window::~Window()
aTempStr.append(") with live SystemWindows destroyed: ");
aTempStr.append(aErrorStr.toString());
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
+ Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
}
if ( mpWindowImpl->mpFirstChild )
@@ -311,7 +310,7 @@ Window::~Window()
pTempWin = pTempWin->mpWindowImpl->mpNext;
}
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
+ Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
}
if ( mpWindowImpl->mpFirstOverlap )
@@ -326,7 +325,7 @@ Window::~Window()
pTempWin = pTempWin->mpWindowImpl->mpNext;
}
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
+ Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
}
vcl::Window* pMyParent = GetParent();
@@ -346,7 +345,7 @@ Window::~Window()
aTempStr.append(OUStringToOString(GetText(), RTL_TEXTENCODING_UTF8));
aTempStr.append(") still in TaskPanelList!");
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
+ Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug builds, this must be fixed!
}
}
#endif
@@ -417,7 +416,7 @@ Window::~Window()
RTL_TEXTENCODING_UTF8)).
append(") with focussed child window destroyed ! THIS WILL LEAD TO CRASHES AND MUST BE FIXED !");
OSL_FAIL( aTempStr.getStr() );
- Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8 )); // abort in debug build version, this must be fixed!
+ Application::Abort(OUString::fromUtf8(aTempStr.makeStringAndClear())); // abort in debug build version, this must be fixed!
#endif
}
@@ -1946,7 +1945,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
}
else
{
- OUString aStrHelpId( OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ OUString aStrHelpId( OUString::fromUtf8( GetHelpId() ) );
if ( aStrHelpId.isEmpty() && ImplGetParent() )
ImplGetParent()->RequestHelp( rHEvt );
else
@@ -3209,7 +3208,7 @@ const Wallpaper& Window::GetDisplayBackground() const
const OUString& Window::GetHelpText() const
{
- OUString aStrHelpId( OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ OUString aStrHelpId( OUString::fromUtf8( GetHelpId() ) );
bool bStrHelpId = !aStrHelpId.isEmpty();
if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 5f6c8a66e32b..8db9d7f81b98 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1539,7 +1539,7 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
{
if ((rKey == "label") || (rKey == "title") || (rKey == "text") )
{
- SetText(OStringToOUString(VclBuilder::convertMnemonicMarkup(rValue), RTL_TEXTENCODING_UTF8));
+ SetText(OUString::fromUtf8(VclBuilder::convertMnemonicMarkup(rValue)));
}
else if (rKey == "visible")
Show(toBool(rValue));
@@ -1618,9 +1618,9 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
else if (rKey == "valign")
set_valign(toAlign(rValue));
else if (rKey == "tooltip-markup")
- SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ SetQuickHelpText(OUString::fromUtf8(rValue));
else if (rKey == "tooltip-text")
- SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ SetQuickHelpText(OUString::fromUtf8(rValue));
else if (rKey == "border-width")
set_border_width(rValue.toInt32());
else if (rKey == "margin-left")
@@ -1653,11 +1653,11 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
}
else if (rKey == "accessible-name")
{
- SetAccessibleName(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ SetAccessibleName(OUString::fromUtf8(rValue));
}
else if (rKey == "accessible-description")
{
- SetAccessibleDescription(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ SetAccessibleDescription(OUString::fromUtf8(rValue));
}
else if (rKey == "use-markup")
{
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index 015f226ed8fb..5732ac20571c 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -523,7 +523,7 @@ void
SwitchIMCallback (XIC, XPointer, XPointer call_data)
{
XIMSwitchIMNotifyCallbackStruct* pCallData = (XIMSwitchIMNotifyCallbackStruct*)call_data;
- ::vcl::I18NStatus::get().changeIM( OStringToOUString(pCallData->to->name, RTL_TEXTENCODING_UTF8) );
+ ::vcl::I18NStatus::get().changeIM( OUString::fromUtf8(pCallData->to->name) );
}
// vii. destroy callbacks: internally disable all IC/IM calls
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 389f74dc8be8..ea7bb0de3735 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -219,7 +219,7 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa
else if (aLine.startsWith(printerEquals))
{
bPrinter = true;
- rJobData.m_aPrinterName = OStringToOUString(aLine.copy(RTL_CONSTASCII_LENGTH(printerEquals)), RTL_TEXTENCODING_UTF8);
+ rJobData.m_aPrinterName = OUString::fromUtf8(aLine.copy(RTL_CONSTASCII_LENGTH(printerEquals)));
}
else if (aLine.startsWith(orientatationEquals))
{
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index fecc6ada9054..97c3668f1542 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -128,9 +128,8 @@ PrinterInfoManager::~PrinterInfoManager()
void PrinterInfoManager::initSystemDefaultPaper()
{
- m_aSystemDefaultPaper = OStringToOUString(
- PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()),
- RTL_TEXTENCODING_UTF8);
+ m_aSystemDefaultPaper = OUString::fromUtf8(
+ PaperInfo::toPSName(PaperInfo::getSystemDefaultPaper().getPaper()));
}
bool PrinterInfoManager::checkPrintersChanged( bool bWait )
@@ -330,10 +329,9 @@ void PrinterInfoManager::initialize()
// initialize to global defaults
aPrinter.m_aInfo = m_aGlobalDefaults;
- aPrinterName = OStringToOUString(aValue.copy(nNamePos+1),
- RTL_TEXTENCODING_UTF8);
+ aPrinterName = OUString::fromUtf8(aValue.copy(nNamePos+1));
aPrinter.m_aInfo.m_aPrinterName = aPrinterName;
- aPrinter.m_aInfo.m_aDriverName = OStringToOUString(aValue.copy(0, nNamePos), RTL_TEXTENCODING_UTF8);
+ aPrinter.m_aInfo.m_aDriverName = OUString::fromUtf8(aValue.copy(0, nNamePos));
// set parser, merge settings
// don't do this for CUPS printers as this is done
@@ -387,14 +385,14 @@ void PrinterInfoManager::initialize()
aValue = "lpr";
#endif
}
- aPrinter.m_aInfo.m_aCommand = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
+ aPrinter.m_aInfo.m_aCommand = OUString::fromUtf8(aValue);
}
aValue = aConfig.ReadKey( "QuickCommand" );
- aPrinter.m_aInfo.m_aQuickCommand = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
+ aPrinter.m_aInfo.m_aQuickCommand = OUString::fromUtf8(aValue);
aValue = aConfig.ReadKey( "Features" );
- aPrinter.m_aInfo.m_aFeatures = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
+ aPrinter.m_aInfo.m_aFeatures = OUString::fromUtf8(aValue);
// override the settings in m_aGlobalDefaults if keys exist
aValue = aConfig.ReadKey( "DefaultPrinter" );
@@ -402,10 +400,10 @@ void PrinterInfoManager::initialize()
aDefaultPrinter = aPrinterName;
aValue = aConfig.ReadKey( "Location" );
- aPrinter.m_aInfo.m_aLocation = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
+ aPrinter.m_aInfo.m_aLocation = OUString::fromUtf8(aValue);
aValue = aConfig.ReadKey( "Comment" );
- aPrinter.m_aInfo.m_aComment = OStringToOUString(aValue, RTL_TEXTENCODING_UTF8);
+ aPrinter.m_aInfo.m_aComment = OUString::fromUtf8(aValue);
aValue = aConfig.ReadKey( "Copies" );
if (!aValue.isEmpty())
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index fe2f0d5e2f52..081542e5af45 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -542,7 +542,7 @@ SetString( uno::Any& rAny, const gchar * value )
if( !aFontName.isEmpty() )
{
- rAny = uno::makeAny( OStringToOUString( aFontName, RTL_TEXTENCODING_UTF8 ) );
+ rAny = uno::makeAny( OUString::fromUtf8( aFontName ) );
return true;
}
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 4eeafb1aeff7..405c4719f10f 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -938,7 +938,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
gchar *gFileName = g_filename_from_uri ( sFileName.getStr(), NULL, NULL );
if( g_file_test( gFileName, G_FILE_TEST_IS_REGULAR ) )
{
- INetURLObject aFileObj( OStringToOUString(sFileName, RTL_TEXTENCODING_UTF8) );
+ INetURLObject aFileObj( OUString::fromUtf8(sFileName) );
OString baseName(
OUStringToOString(
@@ -1382,7 +1382,7 @@ OUString SAL_CALL SalGtkFilePicker::getLabel( sal_Int16 nControlId )
else
OSL_TRACE("Can't get label on list");
- return OStringToOUString( aTxt, RTL_TEXTENCODING_UTF8 );
+ return OUString::fromUtf8( aTxt );
}
// XFilePreview functions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index bab4f5c6f888..6d669e88fcd7 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3898,7 +3898,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
psp::FastPrintFontInfo aInfo;
// set family name
- aInfo.m_aFamilyName = OStringToOUString( aFamily, RTL_TEXTENCODING_UTF8 );
+ aInfo.m_aFamilyName = OUString::fromUtf8( aFamily );
// set italic
switch( eStyle )
{
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 66d0dddba5d7..96b73c7c218d 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1283,7 +1283,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
psp::FastPrintFontInfo aInfo;
// set family name
- aInfo.m_aFamilyName = OStringToOUString( aFamily, RTL_TEXTENCODING_UTF8 );
+ aInfo.m_aFamilyName = OUString::fromUtf8( aFamily );
// set italic
switch( eStyle )
{
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index 036b52d72e2a..2604b7a5417c 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -67,7 +67,7 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
break;
case NS_ooxml::LN_CT_Border_color:
m_nLineColor = nIntValue;
- appendGrabBag("color", OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8));
+ appendGrabBag("color", OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)));
break;
case NS_ooxml::LN_CT_Border_space: // border distance in points
m_nLineDistance = ConversionHelper::convertTwipToMM100( nIntValue * 20 );
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx
index 4b6657c6ea2f..795c97177ff2 100644
--- a/writerfilter/source/dmapper/CellColorHandler.cxx
+++ b/writerfilter/source/dmapper/CellColorHandler.cxx
@@ -106,13 +106,13 @@ void CellColorHandler::lcl_attribute(Id rName, Value & rVal)
}
break;
case NS_ooxml::LN_CT_Shd_fill:
- createGrabBag("fill", uno::makeAny(OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8)));
+ createGrabBag("fill", uno::makeAny(OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true))));
if( nIntValue == OOXML_COLOR_AUTO )
nIntValue = 0xffffff; //fill color auto means white
m_nFillColor = nIntValue;
break;
case NS_ooxml::LN_CT_Shd_color:
- createGrabBag("color", uno::makeAny(OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8)));
+ createGrabBag("color", uno::makeAny(OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true))));
if( nIntValue == OOXML_COLOR_AUTO )
nIntValue = 0; //shading color auto means black
//color of the shading
@@ -272,8 +272,8 @@ TablePropertyMapPtr CellColorHandler::getProperties()
: m_OutputFormat == Paragraph ? PROP_PARA_BACK_COLOR
: PROP_CHAR_BACK_COLOR, uno::makeAny( nApplyColor ));
- createGrabBag("originalColor", uno::makeAny( OStringToOUString(
- msfilter::util::ConvertColor( nApplyColor, true ), RTL_TEXTENCODING_UTF8 )));
+ createGrabBag("originalColor", uno::makeAny( OUString::fromUtf8(
+ msfilter::util::ConvertColor( nApplyColor, true ) )));
return pPropertyMap;
}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 1c7b19d00db6..d4e0c7bd1746 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -277,7 +277,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
case NS_ooxml::LN_CT_Color_val:
if (m_pImpl->GetTopContext())
m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR, uno::makeAny( nIntValue ) );
- m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "val", OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8));
+ m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "val", OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)));
break;
case NS_ooxml::LN_CT_Underline_color:
if (m_pImpl->GetTopContext())
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx
index e2c32ec6813b..ad23035ed677 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -292,7 +292,7 @@ void TDefTableHandler::lcl_attribute(Id rName, Value & rVal)
appendGrabBag("val", TDefTableHandler::getBorderTypeString(nIntValue));
break;
case NS_ooxml::LN_CT_Border_color:
- appendGrabBag("color", OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8));
+ appendGrabBag("color", OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)));
m_nLineColor = nIntValue;
break;
case NS_ooxml::LN_CT_Border_space:
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index baf7049ec0c7..91722703b94e 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -85,7 +85,7 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescrip
// If this is set, write to this file, instead of the real document during paste.
char* pEnv = getenv("SW_DEBUG_RTF_PASTE_TO");
OUString aOutStr;
- if (!bIsNewDoc && pEnv && utl::LocalFileHelper::ConvertPhysicalNameToURL(OStringToOUString(pEnv, RTL_TEXTENCODING_UTF8), aOutStr))
+ if (!bIsNewDoc && pEnv && utl::LocalFileHelper::ConvertPhysicalNameToURL(OUString::fromUtf8(pEnv), aOutStr))
{
SvStream* pOut = utl::UcbStreamHelper::CreateStream(aOutStr, STREAM_WRITE);
SvStream* pIn = utl::UcbStreamHelper::CreateStream(xInputStream);
@@ -99,7 +99,7 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescrip
if (!bIsNewDoc && pEnv)
{
OUString aInStr;
- utl::LocalFileHelper::ConvertPhysicalNameToURL(OStringToOUString(pEnv, RTL_TEXTENCODING_UTF8), aInStr);
+ utl::LocalFileHelper::ConvertPhysicalNameToURL(OUString::fromUtf8(pEnv), aInStr);
SvStream* pStream = utl::UcbStreamHelper::CreateStream(aInStr, STREAM_READ);
uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream));
xInputStream.set(xStream, uno::UNO_QUERY);
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index bd981f3a6ba0..a123a3a2f89c 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -357,11 +357,11 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
xPropertySet->setPropertyValue("FillColor", aAny);
// fillType will decide, possible it'll be the start color of a gradient.
- aFillModel.moColor.set(OUString("#") + OStringToOUString(msfilter::util::ConvertColor(aAny.get<sal_Int32>()), RTL_TEXTENCODING_UTF8));
+ aFillModel.moColor.set(OUString("#") + OUString::fromUtf8(msfilter::util::ConvertColor(aAny.get<sal_Int32>())));
}
else if (i->first == "fillBackColor")
// fillType will decide, possible it'll be the end color of a gradient.
- aFillModel.moColor2.set(OUString("#") + OStringToOUString(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32())), RTL_TEXTENCODING_UTF8));
+ aFillModel.moColor2.set(OUString("#") + OUString::fromUtf8(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32()))));
else if (i->first == "lineColor")
aLineColor <<= msfilter::util::BGRToRGB(i->second.toInt32());
else if (i->first == "lineBackColor")
@@ -564,7 +564,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
aShadowModel.mbHasShadow = true;
}
else if (i->first == "shadowColor")
- aShadowModel.moColor.set(OUString("#") + OStringToOUString(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32())), RTL_TEXTENCODING_UTF8));
+ aShadowModel.moColor.set(OUString("#") + OUString::fromUtf8(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32()))));
else if (i->first == "shadowOffsetX")
// EMUs to points
aShadowModel.moOffset.set(OUString::number(i->second.toDouble() / 12700) + "pt");
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 3c22f9d3b341..30779d14b652 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -206,7 +206,7 @@ SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
SotStorageStreamRef OLEStorageImpl::getStream(const std::size_t nId)
{
if (!maStreams[nId].stream.ref.Is())
- maStreams[nId].stream.ref = createStream(rtl::OStringToOUString(maStreams[nId].name, RTL_TEXTENCODING_UTF8));
+ maStreams[nId].stream.ref = createStream(rtl::OUString::fromUtf8(maStreams[nId].name));
return maStreams[nId].stream.ref;
}
@@ -352,7 +352,7 @@ Reference<XInputStream> ZipStorageImpl::getStream(const rtl::OUString &rPath)
Reference<XInputStream> ZipStorageImpl::getStream(const std::size_t nId)
{
if (!maStreams[nId].xStream.is())
- maStreams[nId].xStream = createStream(rtl::OStringToOUString(maStreams[nId].aName, RTL_TEXTENCODING_UTF8));
+ maStreams[nId].xStream = createStream(rtl::OUString::fromUtf8(maStreams[nId].aName));
return maStreams[nId].xStream;
}
@@ -625,7 +625,7 @@ bool WPXSvInputStreamImpl::existsSubStream(const char *const name)
PositionHolder pos(mxSeekable);
mxSeekable->seek(0);
- const rtl::OUString aName(rtl::OStringToOUString(rtl::OString(name), RTL_TEXTENCODING_UTF8));
+ const rtl::OUString aName(rtl::OUString::fromUtf8(rtl::OString(name)));
if (isOLE())
{
@@ -655,7 +655,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char
PositionHolder pos(mxSeekable);
mxSeekable->seek(0);
- const rtl::OUString aName(rtl::OStringToOUString(rtl::OString(name), RTL_TEXTENCODING_UTF8));
+ const rtl::OUString aName(rtl::OUString::fromUtf8(rtl::OString(name)));
if (isOLE())
{