diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-27 17:01:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-28 16:45:48 +0100 |
commit | 5efc15f0006866ac4c422c1b2bde173ded47893f (patch) | |
tree | 119b46339aae67b9a5b1a76ea2a955a548e5016e /basctl/source | |
parent | e39a959429234aef5348a8b5800b27c29de02a6f (diff) |
reduce use of UniString from ResID ctor
Change-Id: I8d7619e7807ff2d400ec5c7fd181375130245728
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 20 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 14 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/objdlg.cxx | 6 |
8 files changed, 35 insertions, 35 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 962658ffda91..0593c12c867e 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -455,7 +455,7 @@ bool ModulWindow::LoadBasic() AssertValidEditEngine(); sal_uLong nLines = CalcLineCount( *pStream ); // nLines*4: ReadText/Formatting/Highlighting/Formatting - GetEditorWindow().CreateProgress( String( IDEResId( RID_STR_GENERATESOURCE ) ), nLines*4 ); + GetEditorWindow().CreateProgress( IDEResId(RID_STR_GENERATESOURCE).toString(), nLines*4 ); GetEditEngine()->SetUpdateMode( false ); GetEditView()->Read( *pStream ); GetEditEngine()->SetUpdateMode( true ); @@ -516,7 +516,7 @@ bool ModulWindow::SaveBasicSource() bDone = true; } else - ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId( RID_STR_COULDNTWRITE) ).Execute(); + ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_COULDNTWRITE).toString() ).Execute(); } return bDone; @@ -1468,7 +1468,7 @@ void ModulWindowLayout::UpdateDebug (bool bBasicStopped) void ModulWindowLayout::Paint (Rectangle const&) { - DrawText(Point(), String(IDEResId(RID_STR_NOMODULE))); + DrawText(Point(), IDEResId(RID_STR_NOMODULE).toString()); } // virtual diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index cde1f42c7d3c..2347616bdb48 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -466,7 +466,7 @@ bool EditorWindow::ImpCanModify() { // If in Trace-mode, abort the trace or refuse input // Remove markers in the modules in Notify at Basic::Stoped - if ( QueryBox( 0, WB_OK_CANCEL, String( IDEResId( RID_STR_WILLSTOPPRG ) ) ).Execute() == RET_OK ) + if ( QueryBox( 0, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString() ).Execute() == RET_OK ) { rModulWindow.GetBasicStatus().bIsRunning = false; StopBasic(); @@ -624,7 +624,7 @@ void EditorWindow::CreateEditEngine() // for the text then if the source code is long... pProgress.reset(new ProgressInfo( GetShell()->GetViewFrame()->GetObjectShell(), - String(IDEResId(RID_STR_GENERATESOURCE)), + IDEResId(RID_STR_GENERATESOURCE).toString(), nLines*4 )); setTextEngineText(*pEditEngine, aOUSource); @@ -1220,8 +1220,8 @@ WatchWindow::WatchWindow (Layout* pParent) : | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ), aHeaderBar( this, WB_BUTTONSTYLE | WB_BORDER ) { - aXEdit.SetAccessibleName(String(IDEResId( RID_STR_WATCHNAME))); - aTreeListBox.SetAccessibleName(String(IDEResId(RID_STR_WATCHNAME))); + aXEdit.SetAccessibleName(IDEResId(RID_STR_WATCHNAME).toString()); + aTreeListBox.SetAccessibleName(IDEResId(RID_STR_WATCHNAME).toString()); long nTextLen = GetTextWidth( aWatchStr ) + DWBORDER + 3; aXEdit.SetPosPixel( Point( nTextLen, 3 ) ); @@ -1260,9 +1260,9 @@ WatchWindow::WatchWindow (Layout* pParent) : long nVarTabWidth = 220; long nValueTabWidth = 100; long nTypeTabWidth = 1250; - aHeaderBar.InsertItem( ITEM_ID_VARIABLE, String( IDEResId( RID_STR_WATCHVARIABLE ) ), nVarTabWidth ); - aHeaderBar.InsertItem( ITEM_ID_VALUE, String( IDEResId( RID_STR_WATCHVALUE ) ), nValueTabWidth ); - aHeaderBar.InsertItem( ITEM_ID_TYPE, String( IDEResId( RID_STR_WATCHTYPE ) ), nTypeTabWidth ); + aHeaderBar.InsertItem( ITEM_ID_VARIABLE, IDEResId(RID_STR_WATCHVARIABLE).toString(), nVarTabWidth ); + aHeaderBar.InsertItem( ITEM_ID_VALUE, IDEResId(RID_STR_WATCHVALUE).toString(), nValueTabWidth ); + aHeaderBar.InsertItem( ITEM_ID_TYPE, IDEResId(RID_STR_WATCHTYPE).toString(), nTypeTabWidth ); long tabs[ 4 ]; tabs[ 0 ] = 3; // two tabs @@ -1278,7 +1278,7 @@ WatchWindow::WatchWindow (Layout* pParent) : aTreeListBox.Show(); - SetText( String( IDEResId( RID_STR_WATCHNAME ) ) ); + SetText(IDEResId(RID_STR_WATCHNAME).toString()); SetHelpId( HID_BASICIDE_WATCHWINDOW ); @@ -1510,14 +1510,14 @@ StackWindow::StackWindow (Layout* pParent) : aStackStr( IDEResId( RID_STR_STACK ) ) { aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST); - aTreeListBox.SetAccessibleName(String( IDEResId(RID_STR_STACKNAME))); + aTreeListBox.SetAccessibleName(IDEResId(RID_STR_STACKNAME).toString()); aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) ); aTreeListBox.SetHighlightRange(); aTreeListBox.SetSelectionMode( NO_SELECTION ); aTreeListBox.InsertEntry( String(), 0, false, LIST_APPEND ); aTreeListBox.Show(); - SetText( String( IDEResId( RID_STR_STACKNAME ) ) ); + SetText(IDEResId(RID_STR_STACKNAME).toString()); SetHelpId( HID_BASICIDE_STACKWINDOW ); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 474e792eb5c5..1ccc4ada2ea7 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -101,7 +101,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) nActModWindows++; } - if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && QueryBox( pCurWin, WB_YES_NO|WB_DEF_YES, String(IDEResId(RID_STR_SEARCHALLMODULES)) ).Execute() == RET_YES ) ) + if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && QueryBox( pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString() ).Execute() == RET_YES ) ) { for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it) { @@ -180,7 +180,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SetCurWindow( pWin, true ); } if ( !nFound && !bCanceled ) - InfoBox( pCurWin, String(IDEResId(RID_STR_SEARCHNOTFOUND)) ).Execute(); + InfoBox( pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString() ).Execute(); } rReq.Done(); diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index d5e4b919e7e6..321f282c4a48 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -359,7 +359,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, { // error bError = true; - ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute(); + ErrorBox( NULL, WB_OK | WB_DEF_OK, IDEResId(RID_STR_ERRORCHOOSEMACRO).toString() ).Execute(); } } } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 83cf3ba98c2c..41c2491a05ca 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -562,7 +562,7 @@ long TabBar::AllowRenaming() bool const bValid = IsValidSbxName(GetEditText()); if ( !bValid ) - ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); + ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); return bValid ? TABBAR_RENAMING_YES : TABBAR_RENAMING_NO; } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index f172160dc0dc..36dae438cc8b 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -440,7 +440,7 @@ void MacroChooser::CheckButtons() bNewDelIsDel = pMethod ? true : false; if (bPrev != bNewDelIsDel && nMode == All) { - String aBtnText( bNewDelIsDel ? IDEResId( RID_STR_BTNDEL) : IDEResId( RID_STR_BTNNEW ) ); + OUString aBtnText( bNewDelIsDel ? IDEResId(RID_STR_BTNDEL).toString() : IDEResId(RID_STR_BTNNEW).toString() ); m_pDelButton->SetText( aBtnText ); } @@ -622,7 +622,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); if ( aDocument.isDocument() && !aDocument.allowMacros() ) { - WarningBox( this, WB_OK, String( IDEResId( RID_STR_CANNOTRUNMACRO ) ) ).Execute(); + WarningBox( this, WB_OK, IDEResId(RID_STR_CANNOTRUNMACRO).toString() ).Execute(); return 0; } } @@ -631,7 +631,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) { if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) ) { - ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); + ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) ); m_pMacroNameEdit->GrabFocus(); return 0; @@ -699,7 +699,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) { if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) ) { - ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); + ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) ); m_pMacroNameEdit->GrabFocus(); return 1; @@ -804,7 +804,7 @@ void MacroChooser::SetMode (Mode nM) { case All: { - m_pRunButton->SetText( String( IDEResId( RID_STR_RUN ) ) ); + m_pRunButton->SetText(IDEResId(RID_STR_RUN).toString()); EnableButton(*m_pDelButton, true); EnableButton(*m_pOrganizeButton, true); break; @@ -812,7 +812,7 @@ void MacroChooser::SetMode (Mode nM) case ChooseOnly: { - m_pRunButton->SetText( String( IDEResId( RID_STR_CHOOSE ) ) ); + m_pRunButton->SetText(IDEResId(RID_STR_CHOOSE).toString()); EnableButton(*m_pDelButton, false); EnableButton(*m_pOrganizeButton, false); break; @@ -820,7 +820,7 @@ void MacroChooser::SetMode (Mode nM) case Recording: { - m_pRunButton->SetText( String( IDEResId( RID_STR_RECORD ) ) ); + m_pRunButton->SetText(IDEResId(RID_STR_RECORD).toString()); EnableButton(*m_pDelButton, false); EnableButton(*m_pOrganizeButton, false); diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index ae513291a8fb..8952742bd145 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -785,10 +785,10 @@ void LibPage::InsertLib() Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); // file open dialog Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE); - xFP->setTitle( String( IDEResId( RID_STR_APPENDLIBS ) ) ); + xFP->setTitle(IDEResId(RID_STR_APPENDLIBS).toString()); // filter - OUString aTitle = String( IDEResId( RID_STR_BASIC ) ); + OUString aTitle(IDEResId(RID_STR_BASIC).toString()); OUString aFilter; aFilter = "*.sbl;*.xlc;*.xlb" ; // library files aFilter += ";*.sdw;*.sxw;*.odt" ; // text @@ -1245,10 +1245,10 @@ void LibPage::ExportAsPackage( const String& aLibName ) Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_SIMPLE); - xFP->setTitle( String( IDEResId( RID_STR_EXPORTPACKAGE ) ) ); + xFP->setTitle(IDEResId(RID_STR_EXPORTPACKAGE).toString()); // filter - OUString aTitle = String( IDEResId( RID_STR_PACKAGE_BUNDLE ) ); + OUString aTitle(IDEResId(RID_STR_PACKAGE_BUNDLE).toString()); OUString aFilter; aFilter = "*.oxt" ; // library files xFP->appendFilter( aTitle, aFilter ); @@ -1365,7 +1365,7 @@ void LibPage::ExportAsBasic( const String& aLibName ) Reference< XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext); Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) ); - xFolderPicker->setTitle( String( IDEResId( RID_STR_EXPORTBASIC ) ) ); + xFolderPicker->setTitle(IDEResId(RID_STR_EXPORTBASIC).toString()); // set display directory and filter String aPath =GetExtraData()->GetAddLibPath(); @@ -1569,17 +1569,17 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, if ( aLibName.getLength() > 30 ) { - ErrorBox( pWin, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_LIBNAMETOLONG ) ) ).Execute(); + ErrorBox( pWin, WB_OK | WB_DEF_OK, IDEResId(RID_STR_LIBNAMETOLONG).toString() ).Execute(); } else if ( !IsValidSbxName( aLibName ) ) { ErrorBox( pWin, WB_OK | WB_DEF_OK, - String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); + IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); } else if ( rDocument.hasLibrary( E_SCRIPTS, aLibName ) || rDocument.hasLibrary( E_DIALOGS, aLibName ) ) { ErrorBox( pWin, WB_OK | WB_DEF_OK, - String( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute(); + IDEResId(RID_STR_SBXNAMEALLREADYUSED2).toString() ).Execute(); } else { diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index cb707e9119fe..3244507fc9ab 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -43,10 +43,10 @@ ObjectCatalog::ObjectCatalog (Window* pParent) : aTree(this, IDEResId(RID_TLB_MACROS)) { SetHelpId("basctl:FloatingWindow:RID_BASICIDE_OBJCAT"); - SetText(String(IDEResId(RID_BASICIDE_OBJCAT))); + SetText(IDEResId(RID_BASICIDE_OBJCAT).toString()); // title - aTitle.SetText(String(IDEResId(RID_BASICIDE_OBJCAT))); + aTitle.SetText(IDEResId(RID_BASICIDE_OBJCAT).toString()); aTitle.SetStyle(WB_CENTER); // tree list @@ -56,7 +56,7 @@ ObjectCatalog::ObjectCatalog (Window* pParent) : WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT ); - aTree.SetAccessibleName(String(IDEResId(RID_STR_TLB_MACROS))); + aTree.SetAccessibleName(IDEResId(RID_STR_TLB_MACROS).toString()); aTree.SetHelpId(HID_BASICIDE_OBJECTCAT); aTree.ScanAllEntries(); aTree.GrabFocus(); |