diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-02 16:02:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-03 21:24:35 +0100 |
commit | bccf34c19ae022b67565e212fa4ec0d5213947de (patch) | |
tree | 73c2d2e29ad8d15999cbfb2ff554efa1e502a35e /extensions | |
parent | 285289275d1cf1769080a208b55be984cd269e1e (diff) |
ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/abpilot/abpfinalpage.cxx | 3 | ||||
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/commonpagesdbp.cxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserline.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/eformshelper.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/fontdialog.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/usercontrol.cxx | 2 | ||||
-rw-r--r-- | extensions/source/scanner/sane.cxx | 2 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 2 |
11 files changed, 15 insertions, 19 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index 4df35081def6..1fbc68c29eac 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -47,8 +47,7 @@ namespace abp const SfxFilter* lcl_getBaseFilter() { - 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; } diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 9be49b7596eb..58dd7e40fabe 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -96,7 +96,6 @@ using namespace ::com::sun::star::lang; using namespace ::ucb; #define C2U(cChar) ::rtl::OUString::createFromAscii(cChar) -#define C2S(cChar) String::CreateFromAscii(cChar) Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) { @@ -198,7 +197,7 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm) catch (const Exception& e) { #ifdef DBG_UTIL - String sMsg(String::CreateFromAscii("::getColumns : catched an exception (")); + String sMsg(rtl::OUString("::getColumns : catched an exception (")); sMsg += String(e.Message); sMsg.AppendAscii(") ..."); OSL_FAIL(rtl::OUStringToOString(sMsg, RTL_TEXTENCODING_ASCII_US ).getStr()); @@ -420,7 +419,7 @@ MappingDialog_Impl::MappingDialog_Impl(Window* pParent, BibDataManager* pMan) : aOKBT.SetClickHdl(LINK(this, MappingDialog_Impl, OkHdl)); String sTitle = GetText(); - sTitle.SearchAndReplace(C2S("%1"), pDatMan->getActiveDataTable(), 0); + sTitle.SearchAndReplace(rtl::OUString("%1"), pDatMan->getActiveDataTable(), 0); SetText(sTitle); aListBoxes[0] = &aIdentifierLB; @@ -1520,7 +1519,7 @@ void BibDataManager::SetMeAsUidListener() Sequence< ::rtl::OUString > aFields(xFields->getElementNames()); const ::rtl::OUString* pFields = aFields.getConstArray(); sal_Int32 nCount=aFields.getLength(); - String StrUID(C2S(STR_UID)); + rtl::OUString StrUID(STR_UID); ::rtl::OUString theFieldName; for( sal_Int32 i=0; i<nCount; i++ ) { @@ -1564,7 +1563,7 @@ void BibDataManager::RemoveMeAsUidListener() Sequence< ::rtl::OUString > aFields(xFields->getElementNames()); const ::rtl::OUString* pFields = aFields.getConstArray(); sal_Int32 nCount=aFields.getLength(); - String StrUID(C2S(STR_UID)); + rtl::OUString StrUID(STR_UID); ::rtl::OUString theFieldName; for( sal_Int32 i=0; i<nCount; i++ ) { diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 9efd6fd19198..4c3cc2b66b97 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -205,8 +205,7 @@ namespace dbp ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0); aFileDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() ); - 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!"); if ( pFilter ) { diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 816612344e5e..4d119ccccbb7 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -401,7 +401,7 @@ namespace pcr rpButton = new PushButton( m_pTheParent, WB_NOPOINTERFOCUS ); rpButton->SetGetFocusHdl( LINK( this, OBrowserLine, OnButtonFocus ) ); rpButton->SetClickHdl( LINK( this, OBrowserLine, OnButtonClicked ) ); - rpButton->SetText( String::CreateFromAscii( "..." ) ); + rpButton->SetText(rtl::OUString("...")); } rpButton->Show(); diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 76ebdd27c18a..46fadd4bce4e 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -558,7 +558,7 @@ namespace pcr { // find a nice name for it String sBaseName( PcrRes( RID_STR_BINDING_UI_NAME ) ); - sBaseName += String::CreateFromAscii( " " ); + sBaseName += rtl::OUString(" "); String sNewName; sal_Int32 nNumber = 1; do diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 707e6d7e0ab2..66cd10d231b9 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -548,7 +548,7 @@ namespace pcr { SID_ATTR_CHAR_FONTLIST, 0 } }; - _rpPool = new SfxItemPool(String::CreateFromAscii("PCRControlFontItemPool"), CFID_FIRST_ITEM_ID, CFID_LAST_ITEM_ID, + _rpPool = new SfxItemPool(rtl::OUString("PCRControlFontItemPool"), CFID_FIRST_ITEM_ID, CFID_LAST_ITEM_ID, aItemInfos, _rppDefaults); _rpPool->FreezeIdRanges(); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 5cd7b37c5ca1..f757ca79ed5f 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2893,7 +2893,7 @@ namespace pcr { ::sfx2::FileDialogHelper aFileDlg( ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0, - ::String::CreateFromAscii("sdatabase")); + rtl::OUString("sdatabase")); ::rtl::OUString sDataSource; OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_DATASOURCE ) >>= sDataSource ); @@ -2903,8 +2903,7 @@ namespace pcr // is considered to be potentially expensive aFileDlg.SetDisplayDirectory( sDataSource ); - 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!"); if ( pFilter ) { diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index f42f186ae2be..253ff93bbf28 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -725,7 +725,7 @@ namespace pcr getTypedControlWindow()->SelectEntry( aRgbCol ); if ( !getTypedControlWindow()->IsEntrySelected( aRgbCol ) ) { // the given color is not part of the list -> insert a new entry with the hex code of the color - String aStr = String::CreateFromAscii("0x"); + String aStr = rtl::OUString("0x"); aStr += MakeHexStr(nColor,8); getTypedControlWindow()->InsertEntry( aRgbCol, aStr ); getTypedControlWindow()->SelectEntry( aRgbCol ); diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 1144e8373a6f..4eb64df3a4fd 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -325,7 +325,7 @@ namespace pcr :ONumericControl( pParent, nWinStyle ) { getTypedControlWindow()->SetUnit( FUNIT_CUSTOM ); - getTypedControlWindow()->SetCustomUnitText( String::CreateFromAscii( " ms" ) ); + getTypedControlWindow()->SetCustomUnitText(rtl::OUString(" ms")); getTypedControlWindow()->SetCustomConvertHdl( LINK( this, OTimeDurationControl, OnCustomConvert ) ); } diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 0bc0231a842a..3ace08b76098 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -1003,7 +1003,7 @@ String Sane::GetOptionUnitName( int n ) SANE_Unit nUnit = mppOptions[n]->unit; size_t nUnitAsSize = (size_t)nUnit; if( nUnitAsSize > SAL_N_ELEMENTS( ppUnits ) ) - aText = String::CreateFromAscii( "[unknown units]" ); + aText = rtl::OUString("[unknown units]"); else aText = String( ppUnits[ nUnit ], osl_getThreadTextEncoding() ); return aText; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index ef2e0b1dfd7d..ba446451ae11 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -289,7 +289,7 @@ void SaneDlg::InitFields() else // SANE_UNIT_PIXEL { pField->SetValue( (int)fValue, FUNIT_CUSTOM ); - pField->SetCustomUnitText( String::CreateFromAscii( "Pixel" ) ); + pField->SetCustomUnitText(rtl::OUString("Pixel")); } switch( i ) { case 0: maTopLeft.X() = (int)fValue;break; |