From bccf34c19ae022b67565e212fa4ec0d5213947de Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 2 Jul 2012 16:02:38 +0100 Subject: ditch String::CreateFromAscii Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691 --- dbaccess/source/ui/browser/brwctrlr.cxx | 2 +- dbaccess/source/ui/browser/sbagrid.cxx | 2 +- dbaccess/source/ui/control/FieldDescControl.cxx | 10 +++--- dbaccess/source/ui/dlg/DbAdminImpl.cxx | 6 ++-- dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 4 +-- dbaccess/source/ui/dlg/admincontrols.cxx | 2 +- dbaccess/source/ui/dlg/dbadmin.cxx | 42 +++++++++++----------- dbaccess/source/ui/dlg/dbfindex.cxx | 4 +-- dbaccess/source/ui/dlg/directsql.cxx | 8 ++--- dbaccess/source/ui/dlg/generalpage.cxx | 2 +- dbaccess/source/ui/dlg/paramdialog.cxx | 2 +- dbaccess/source/ui/misc/UITools.cxx | 7 ++-- dbaccess/source/ui/misc/WTypeSelect.cxx | 2 +- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 ++-- .../source/ui/querydesign/SelectionBrowseBox.cxx | 10 +++--- dbaccess/source/ui/querydesign/querycontroller.cxx | 2 +- 16 files changed, 55 insertions(+), 56 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index ad0b4e647d74..d28d5821a059 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -2011,7 +2011,7 @@ void SbaXDataBrowserController::ExecuteSearch() if ( pFact ) { ::std::vector< String > aContextNames; - aContextNames.push_back( String::CreateFromAscii("Standard") ); + aContextNames.push_back( rtl::OUString("Standard") ); pDialog = pFact->CreateFmSearchDialog(getBrowserView(), sInitialText, aContextNames, 0, LINK(this, SbaXDataBrowserController, OnSearchContextRequest)); } OSL_ENSURE( pDialog, "SbaXDataBrowserController::ExecuteSearch: could not get the search dialog!" ); diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 4e37c5677438..082fae181c67 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -965,7 +965,7 @@ void SbaGridControl::SetBrowserAttrs() ); if (!xDialog.is()) { - ShowServiceNotAvailableError(this, String::CreateFromAscii("com.sun.star.form.ControlFontDialog"), sal_True); + ShowServiceNotAvailableError(this, rtl::OUString("com.sun.star.form.ControlFontDialog"), sal_True); return; } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index f8e781bbe2db..2759864379de 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -972,11 +972,11 @@ void OFieldDescControl::ActivateAggregate( EControlType eType ) pNumType = new OPropListBoxCtrl( this, STR_HELP_NUMERIC_TYPE, FIELD_PROPERTY_NUMTYPE, WB_DROPDOWN ); pNumType->SetDropDownLineCount(5); - pNumType->InsertEntry( String::CreateFromAscii("Byte") ); - pNumType->InsertEntry( String::CreateFromAscii("SmallInt") ); - pNumType->InsertEntry( String::CreateFromAscii("Integer") ); - pNumType->InsertEntry( String::CreateFromAscii("Single") ); - pNumType->InsertEntry( String::CreateFromAscii("Double") ); + pNumType->InsertEntry( rtl::OUString("Byte") ); + pNumType->InsertEntry( rtl::OUString("SmallInt") ); + pNumType->InsertEntry( rtl::OUString("Integer") ); + pNumType->InsertEntry( rtl::OUString("Single") ); + pNumType->InsertEntry( rtl::OUString("Double") ); pNumType->SelectEntryPos(2); InitializeControl(pNumType,HID_TAB_ENT_NUMTYP,true); break; diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index cda30378d4e4..a0d53c47c5d5 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -132,7 +132,7 @@ namespace if ( _pPortNumber ) { - sNewUrl += String::CreateFromAscii(":"); + sNewUrl += rtl::OUString::createFromAscii(":"); sNewUrl += String::CreateFromInt32(_pPortNumber->GetValue()); } @@ -524,7 +524,7 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const if ( sDatabaseName.Len() ) { - sNewUrl += String::CreateFromAscii("/"); + sNewUrl += rtl::OUString::createFromAscii("/"); sNewUrl += sDatabaseName; } } @@ -543,7 +543,7 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const sDatabaseName = pCollection->cutPrefix( pUrlItem->GetValue() ); if ( sDatabaseName.Len() ) { - sNewUrl += String::CreateFromAscii(":"); + sNewUrl += rtl::OUString::createFromAscii(":"); sNewUrl += sDatabaseName; } } diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 957aa84fdfb2..a04d977daf83 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -464,9 +464,9 @@ DBG_NAME(OTextConnectionHelper) { String sExtension; if (m_aRBAccessTextFiles.IsChecked()) - sExtension = String::CreateFromAscii("txt"); + sExtension = rtl::OUString("txt"); else if (m_aRBAccessCSVFiles.IsChecked()) - sExtension = String::CreateFromAscii("csv"); + sExtension = rtl::OUString("csv"); else { sExtension = m_aETOwnExtension.GetText(); diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index e19f92193f0d..3f859db90954 100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -169,7 +169,7 @@ namespace dbaui m_aControlDependencies.enableOnRadioCheck( m_aNamedPipeRadio, m_aNamedPipe ); m_aControlDependencies.addController( ::svt::PDialogController( - new TextResetOperatorController( m_aHostName, String::CreateFromAscii( "localhost" ) ) + new TextResetOperatorController( m_aHostName, rtl::OUString("localhost") ) ) ); // sockets are available on Unix systems only, named pipes only on Windows diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 1a37952256ac..7c36e19528b1 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -328,26 +328,26 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp // create and initialize the defaults _rppDefaults = new SfxPoolItem*[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1]; SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults - *pCounter++ = new SfxStringItem(DSID_NAME, String()); - *pCounter++ = new SfxStringItem(DSID_ORIGINALNAME, String()); - *pCounter++ = new SfxStringItem(DSID_CONNECTURL, String()); + *pCounter++ = new SfxStringItem(DSID_NAME, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_ORIGINALNAME, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_CONNECTURL, rtl::OUString()); *pCounter++ = new OStringListItem(DSID_TABLEFILTER, Sequence< ::rtl::OUString >(&sFilterAll, 1)); *pCounter++ = new DbuTypeCollectionItem(DSID_TYPECOLLECTION, _pTypeCollection); *pCounter++ = new SfxBoolItem(DSID_INVALID_SELECTION, sal_False); *pCounter++ = new SfxBoolItem(DSID_READONLY, sal_False); - *pCounter++ = new SfxStringItem(DSID_USER, String()); - *pCounter++ = new SfxStringItem(DSID_PASSWORD, String()); - *pCounter++ = new SfxStringItem(DSID_ADDITIONALOPTIONS, String()); - *pCounter++ = new SfxStringItem(DSID_CHARSET, String()); + *pCounter++ = new SfxStringItem(DSID_USER, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_PASSWORD, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_ADDITIONALOPTIONS, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_CHARSET, rtl::OUString()); *pCounter++ = new SfxBoolItem(DSID_PASSWORDREQUIRED, sal_False); *pCounter++ = new SfxBoolItem(DSID_SHOWDELETEDROWS, sal_False); *pCounter++ = new SfxBoolItem(DSID_ALLOWLONGTABLENAMES, sal_False); - *pCounter++ = new SfxStringItem(DSID_JDBCDRIVERCLASS, String()); + *pCounter++ = new SfxStringItem(DSID_JDBCDRIVERCLASS, rtl::OUString()); *pCounter++ = new SfxStringItem(DSID_FIELDDELIMITER, ','); *pCounter++ = new SfxStringItem(DSID_TEXTDELIMITER, '"'); *pCounter++ = new SfxStringItem(DSID_DECIMALDELIMITER, '.'); - *pCounter++ = new SfxStringItem(DSID_THOUSANDSDELIMITER, String()); - *pCounter++ = new SfxStringItem(DSID_TEXTFILEEXTENSION, String::CreateFromAscii("txt")); + *pCounter++ = new SfxStringItem(DSID_THOUSANDSDELIMITER, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_TEXTFILEEXTENSION, rtl::OUString("txt")); *pCounter++ = new SfxBoolItem(DSID_TEXTFILEHEADER, sal_True); *pCounter++ = new SfxBoolItem(DSID_PARAMETERNAMESUBST, sal_False); *pCounter++ = new SfxInt32Item(DSID_CONN_PORTNUMBER, 8100); @@ -356,16 +356,16 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp *pCounter++ = new SfxBoolItem(DSID_CONN_SHUTSERVICE, sal_False); *pCounter++ = new SfxInt32Item(DSID_CONN_DATAINC, 20); *pCounter++ = new SfxInt32Item(DSID_CONN_CACHESIZE, 20); - *pCounter++ = new SfxStringItem(DSID_CONN_CTRLUSER, String()); - *pCounter++ = new SfxStringItem(DSID_CONN_CTRLPWD, String()); + *pCounter++ = new SfxStringItem(DSID_CONN_CTRLUSER, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_CONN_CTRLPWD, rtl::OUString()); *pCounter++ = new SfxBoolItem(DSID_USECATALOG, sal_False); - *pCounter++ = new SfxStringItem(DSID_CONN_HOSTNAME, String()); - *pCounter++ = new SfxStringItem(DSID_CONN_LDAP_BASEDN, String()); + *pCounter++ = new SfxStringItem(DSID_CONN_HOSTNAME, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_CONN_LDAP_BASEDN, rtl::OUString()); *pCounter++ = new SfxInt32Item(DSID_CONN_LDAP_PORTNUMBER, 389); *pCounter++ = new SfxInt32Item(DSID_CONN_LDAP_ROWCOUNT, 100); *pCounter++ = new SfxBoolItem(DSID_SQL92CHECK, sal_False); - *pCounter++ = new SfxStringItem(DSID_AUTOINCREMENTVALUE, String()); - *pCounter++ = new SfxStringItem(DSID_AUTORETRIEVEVALUE, String()); + *pCounter++ = new SfxStringItem(DSID_AUTOINCREMENTVALUE, rtl::OUString()); + *pCounter++ = new SfxStringItem(DSID_AUTORETRIEVEVALUE, rtl::OUString()); *pCounter++ = new SfxBoolItem(DSID_AUTORETRIEVEENABLED, sal_False); *pCounter++ = new SfxBoolItem(DSID_APPEND_TABLE_ALIAS, sal_False); *pCounter++ = new SfxInt32Item(DSID_MYSQL_PORTNUMBER, 3306); @@ -377,15 +377,15 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp *pCounter++ = new SfxBoolItem(DSID_SCHEMA, sal_True); *pCounter++ = new SfxBoolItem(DSID_INDEXAPPENDIX, sal_True); *pCounter++ = new SfxBoolItem(DSID_CONN_LDAP_USESSL, sal_False); - *pCounter++ = new SfxStringItem(DSID_DOCUMENT_URL, String()); + *pCounter++ = new SfxStringItem(DSID_DOCUMENT_URL, rtl::OUString()); *pCounter++ = new SfxBoolItem(DSID_DOSLINEENDS, sal_False); - *pCounter++ = new SfxStringItem(DSID_DATABASENAME, String()); + *pCounter++ = new SfxStringItem(DSID_DATABASENAME, rtl::OUString()); *pCounter++ = new SfxBoolItem(DSID_AS_BEFORE_CORRNAME, sal_True); *pCounter++ = new SfxBoolItem(DSID_CHECK_REQUIRED_FIELDS, sal_True); *pCounter++ = new SfxBoolItem(DSID_IGNORECURRENCY, sal_False); - *pCounter++ = new SfxStringItem(DSID_CONN_SOCKET, String()); + *pCounter++ = new SfxStringItem(DSID_CONN_SOCKET, rtl::OUString()); *pCounter++ = new SfxBoolItem(DSID_ESCAPE_DATETIME, sal_True); - *pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, String()); + *pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, rtl::OUString()); *pCounter++ = new OptionalBoolItem( DSID_PRIMARY_KEY_SUPPORT ); *pCounter++ = new SfxInt32Item(DSID_MAX_ROW_SCAN, 100); *pCounter++ = new SfxBoolItem( DSID_RESPECTRESULTSETTYPE,sal_False ); @@ -457,7 +457,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp }; OSL_ENSURE(sizeof(aItemInfos)/sizeof(aItemInfos[0]) == DSID_LAST_ITEM_ID,"Invalid Ids!"); - _rpPool = new SfxItemPool(String::CreateFromAscii("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID, + _rpPool = new SfxItemPool(rtl::OUString("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID, aItemInfos, _rppDefaults); _rpPool->FreezeIdRanges(); diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 747ac1f5f401..2d8d4b2434c9 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -360,7 +360,7 @@ void ODbaseIndexDialog::Init() OTableInfo& rTabInfo = m_aTableInfoList.back(); // open the INF file - aURL.setExtension(String::CreateFromAscii("inf")); + aURL.setExtension(rtl::OUString::createFromAscii("inf")); OFileNotation aTransformer(aURL.GetURLNoPass(), OFileNotation::N_URL); Config aInfFile( aTransformer.get(OFileNotation::N_SYSTEM) ); aInfFile.SetGroup( aGroupIdent ); @@ -471,7 +471,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const } aURL.SetSmartURL(aDsn); aURL.Append(aTableName); - aURL.setExtension(String::CreateFromAscii("inf")); + aURL.setExtension(rtl::OUString::createFromAscii("inf")); OFileNotation aTransformer(aURL.GetURLNoPass(), OFileNotation::N_URL); Config aInfFile( aTransformer.get(OFileNotation::N_SYSTEM) ); diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 6fdbc0567a84..5c917f424b58 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -226,7 +226,7 @@ DBG_NAME(DirectSQLDialog) OSL_ENSURE(xStatement.is(), "DirectSQLDialog::implExecuteStatement: no statement returned by the connection!"); // clear the output box - m_aOutput.SetText(String::CreateFromAscii("")); + m_aOutput.SetText(rtl::OUString()); if (xStatement.is()) { if (::rtl::OUString(_rStatement).toAsciiUpperCase().compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT")),6)==0 && m_pShowOutput->IsChecked()) @@ -287,9 +287,9 @@ DBG_NAME(DirectSQLDialog) void DirectSQLDialog::addStatusText(const String& _rMessage) { String sAppendMessage = String::CreateFromInt32(m_nStatusCount++); - sAppendMessage += String::CreateFromAscii(": "); + sAppendMessage += rtl::OUString(": "); sAppendMessage += _rMessage; - sAppendMessage += String::CreateFromAscii("\n\n"); + sAppendMessage += rtl::OUString("\n\n"); String sCompleteMessage = m_aStatus.GetText(); sCompleteMessage += sAppendMessage; @@ -302,7 +302,7 @@ DBG_NAME(DirectSQLDialog) void DirectSQLDialog::addOutputText(const String& _rMessage) { String sAppendMessage = _rMessage; - sAppendMessage += String::CreateFromAscii("\n"); + sAppendMessage += rtl::OUString("\n"); String sCompleteMessage = m_aOutput.GetText(); sCompleteMessage += sAppendMessage; diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index c87eed4fa0bd..34939b9bdeea 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -597,7 +597,7 @@ namespace dbaui { ::sfx2::FileDialogHelper aFileDlg( ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, - 0, ::String::CreateFromAscii("sdatabase") ); + 0, rtl::OUString::createFromAscii("sdatabase") ); const SfxFilter* pFilter = getStandardDatabaseFilter(); if ( pFilter ) { diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 840a86ecdef7..d5f5accf545c 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -222,7 +222,7 @@ DBG_NAME(OParameterDialog) LocalResourceAccess aDummy(DLG_PARAMETERS, RSC_MODALDIALOG); sMessage = String(ModuleRes(STR_COULD_NOT_CONVERT_PARAM)); } - sMessage.SearchAndReplaceAll(String::CreateFromAscii("$name$"), sName); + sMessage.SearchAndReplaceAll(rtl::OUString("$name$"), sName); ErrorBox(NULL, WB_OK, sMessage).Execute(); m_aParam.GrabFocus(); return 1L; diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 000ff80d5166..e2af63da73a8 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -926,7 +926,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent, new SvxNumberInfoItem(SID_ATTR_NUMBERFORMAT_INFO) }; - SfxItemPool* pPool = new SfxItemPool(String::CreateFromAscii("GridBrowserProperties"), SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, pDefaults); + SfxItemPool* pPool = new SfxItemPool(rtl::OUString("GridBrowserProperties"), SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, pDefaults); pPool->SetDefaultMetric( SFX_MAPUNIT_TWIP ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same @@ -1007,8 +1007,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent, //------------------------------------------------------------------------------ const SfxFilter* getStandardDatabaseFilter() { - static const String s_sDatabaseType = String::CreateFromAscii("StarOffice XML (Base)"); - const SfxFilter* pFilter = SfxFilter::GetFilterByName( s_sDatabaseType); + const SfxFilter* pFilter = SfxFilter::GetFilterByName(rtl::OUString("StarOffice XML (Base)")); OSL_ENSURE(pFilter,"Filter: StarOffice XML (Base) could not be found!"); return pFilter; } @@ -1401,7 +1400,7 @@ sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText { SolarMutexGuard aGuard; String aMsg = String(ModuleRes(_nText)); - aMsg.SearchAndReplace(String::CreateFromAscii("%1"),String(_sName)); + aMsg.SearchAndReplace(rtl::OUString("%1"),String(_sName)); OSQLMessageBox aAsk(_pParent,String(ModuleRes(_nTitle )),aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query); if ( _bAll ) { diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index 60ddd349a259..4b3078b2cb3e 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -242,7 +242,7 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream ) m_aTypeControl.Show(); m_aTypeControl.Init(); - m_etAuto.SetText(String::CreateFromAscii("10")); + m_etAuto.SetText(rtl::OUString("10")); m_etAuto.SetDecimalDigits(0); m_pbAuto.SetClickHdl(LINK(this,OWizTypeSelect,ButtonClickHdl)); m_lbColumnNames.EnableMultiSelection(sal_True); diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 02bd3f65cb86..0e9d406158da 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -941,9 +941,9 @@ namespace aWorkStr += quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote); aWorkStr += ::dbtools::quoteName(aQuote, aColumnName); } - aWorkStr += ::rtl::OUString(' '); - aWorkStr += String::CreateFromAscii( ";ASC;DESC" ).GetToken( (sal_uInt16)eOrder ); - aWorkStr += ::rtl::OUString(','); + aWorkStr += rtl::OUString(' '); + aWorkStr += rtl::OUString( ";ASC;DESC" ).getToken( (sal_uInt16)eOrder, ';' ); + aWorkStr += rtl::OUString(','); } } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 5d1c492f0348..b7a07cf1781a 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -50,8 +50,8 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::util; using namespace ::com::sun::star::accessibility; -const String g_strOne = String::CreateFromAscii("1"); -const String g_strZero = String::CreateFromAscii("0"); +#define g_strOne rtl::OUString("1") +#define g_strZero rtl::OUString("0") #define DEFAULT_QUERY_COLS 20 #define DEFAULT_SIZE GetTextWidth(g_strZero) * 30 @@ -1122,9 +1122,9 @@ sal_Bool OSelectionBrowseBox::SaveModified() case DataType::CLOB: if(aText.GetChar(0) != '\'' || aText.GetChar(aText.Len() -1) != '\'') { - aText.SearchAndReplaceAll(String::CreateFromAscii("'"),String::CreateFromAscii("''")); - String aTmp(String::CreateFromAscii("'")); - (aTmp += aText) += String::CreateFromAscii("'"); + aText.SearchAndReplaceAll(rtl::OUString("'"), rtl::OUString("''")); + String aTmp(rtl::OUString("'")); + (aTmp += aText) += rtl::OUString("'"); aText = aTmp; } break; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index a67519e7cb94..eb678236f3ba 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -242,7 +242,7 @@ namespace dbaui LocalResourceAccess aLocalRes( RSC_QUERY_OBJECT_TYPE, RSC_RESOURCE ); sObjectType = String( ModuleRes( (sal_uInt16)( _nCommandType + 1 ) ) ); } - sMessageText.SearchAndReplace( String::CreateFromAscii( "$object$" ), sObjectType ); + sMessageText.SearchAndReplace( rtl::OUString("$object$"), sObjectType ); return sMessageText; } } -- cgit