summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-29 23:36:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-30 11:22:09 +0100
commit8a0685d49f679d6f98de2f357f1ec74590573852 (patch)
tree97eb05105a45186049c1c3dad20233c29747ed9c /basctl
parentb18cfdc7cd3755c147970f86d23973f337be01a7 (diff)
make ResId::toString a non-static member
Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx14
-rw-r--r--basctl/source/basicide/baside3.cxx26
-rw-r--r--basctl/source/basicide/basides1.cxx4
-rw-r--r--basctl/source/basicide/basides2.cxx4
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--basctl/source/basicide/basobj2.cxx4
-rw-r--r--basctl/source/basicide/basobj3.cxx4
-rw-r--r--basctl/source/basicide/bastype2.cxx8
-rw-r--r--basctl/source/basicide/bastypes.cxx6
-rw-r--r--basctl/source/basicide/macrodlg.cxx4
-rw-r--r--basctl/source/basicide/moduldl2.cxx40
-rw-r--r--basctl/source/basicide/moduldlg.cxx16
-rw-r--r--basctl/source/basicide/scriptdocument.cxx12
-rw-r--r--basctl/source/dlged/dlgedobj.cxx2
-rw-r--r--basctl/source/dlged/managelang.cxx12
-rw-r--r--basctl/source/dlged/propbrw.cxx10
-rw-r--r--basctl/source/inc/iderid.hxx1
17 files changed, 85 insertions, 84 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 3e1827859727..500f377f7fa3 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -127,7 +127,7 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
{
::rtl::OUStringBuffer aPageStr;
aPageStr.appendAscii( RTL_CONSTASCII_STRINGPARAM( " [" ) );
- aPageStr.append(ResId::toString( IDEResId( RID_STR_PAGE ) ));
+ aPageStr.append(IDE_RESSTR(RID_STR_PAGE));
aPageStr.append(' ');
aPageStr.append( nCurPage );
aPageStr.append(']');
@@ -303,7 +303,7 @@ sal_Bool ModulWindow::BasicExecute()
{
if ( !aDocument.allowMacros() )
{
- WarningBox( this, WB_OK, ResId::toString( IDEResId( RID_STR_CANNOTRUNMACRO ) ) ).Execute();
+ WarningBox( this, WB_OK, IDE_RESSTR(RID_STR_CANNOTRUNMACRO)).Execute();
return sal_False;
}
}
@@ -440,7 +440,7 @@ sal_Bool ModulWindow::LoadBasic()
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.bas" ) ) );
- xFltMgr->appendFilter( ResId::toString(IDEResId( RID_STR_FILTER_ALLFILES ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
+ xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
xFltMgr->setCurrentFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) );
if( xFP->execute() == RET_OK )
@@ -468,7 +468,7 @@ sal_Bool ModulWindow::LoadBasic()
bDone = sal_True;
}
else
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_COULDNTREAD ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_COULDNTREAD) ).Execute();
}
return bDone;
}
@@ -500,7 +500,7 @@ sal_Bool ModulWindow::SaveBasicSource()
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.bas" ) ) );
- xFltMgr->appendFilter( ResId::toString(IDEResId( RID_STR_FILTER_ALLFILES ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
+ xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
xFltMgr->setCurrentFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) );
if( xFP->execute() == RET_OK )
@@ -677,10 +677,10 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
::rtl::OUStringBuffer aErrorTextPrefixBuf;
if( pBasic->IsCompilerError() )
- aErrorTextPrefixBuf.append(ResId::toString(IDEResId(RID_STR_COMPILEERROR)));
+ aErrorTextPrefixBuf.append(IDE_RESSTR(RID_STR_COMPILEERROR));
else
{
- aErrorTextPrefixBuf.append(ResId::toString(IDEResId(RID_STR_RUNTIMEERROR)));
+ aErrorTextPrefixBuf.append(IDE_RESSTR(RID_STR_RUNTIMEERROR));
aErrorTextPrefixBuf.append(StarBASIC::GetVBErrorCode(pBasic->GetErrorCode()));
aErrorTextPrefixBuf.append(' ');
pLayout->GetStackWindow().UpdateCalls();
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index a7acc1e72002..a1a0bf144700 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -731,10 +731,10 @@ sal_Bool DialogWindow::SaveDialog()
xFP->setDefaultName( ::rtl::OUString( GetName() ) );
- ::rtl::OUString aDialogStr(ResId::toString(IDEResId(RID_STR_STDDIALOGNAME)));
+ ::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
- xFltMgr->appendFilter( String( IDEResId( RID_STR_FILTER_ALLFILES ) ), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
+ xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
xFltMgr->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
@@ -876,7 +876,7 @@ sal_Bool DialogWindow::SaveDialog()
}
}
else
- ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTWRITE) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_COULDNTWRITE)).Execute();
}
return bDone;
@@ -936,9 +936,9 @@ NameClashQueryBox::NameClashQueryBox( Window* pParent,
maMessText = rMessage;
- AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_RENAME ) ), RET_YES,
+ AddButton( IDE_RESSTR(RID_STR_DLGIMP_CLASH_RENAME), RET_YES,
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
- AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_REPLACE ) ), RET_NO, 0 );
+ AddButton( IDE_RESSTR(RID_STR_DLGIMP_CLASH_REPLACE), RET_NO, 0 );
AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
SetImage( QueryBox::GetStandardImage() );
@@ -960,9 +960,9 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
SetText( rTitle );
maMessText = rMessage;
- AddButton( String( IDEResId( RID_STR_DLGIMP_MISMATCH_ADD ) ), RET_YES,
+ AddButton( IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_ADD), RET_YES,
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
- AddButton( String( IDEResId( RID_STR_DLGIMP_MISMATCH_OMIT ) ), RET_NO, 0 );
+ AddButton( IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_OMIT), RET_NO, 0 );
AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 4 );
@@ -993,10 +993,10 @@ sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
- ::rtl::OUString aDialogStr(ResId::toString(IDEResId(RID_STR_STDDIALOGNAME)));
+ ::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
- xFltMgr->appendFilter( String( IDEResId( RID_STR_FILTER_ALLFILES ) ), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
+ xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
xFltMgr->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
@@ -1060,8 +1060,8 @@ sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const
NameClashMode eNameClashMode = NO_CLASH;
if( bDialogAlreadyExists )
{
- ::rtl::OUString aQueryBoxTitle(ResId::toString(IDEResId(RID_STR_DLGIMP_CLASH_TITLE)));
- ::rtl::OUString aQueryBoxText(ResId::toString(IDEResId(RID_STR_DLGIMP_CLASH_TEXT)));
+ ::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TITLE));
+ ::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName);
NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
@@ -1124,8 +1124,8 @@ sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const
bool bAddDialogLanguagesToLib = false;
if( nOnlyInImportLanguageCount > 0 )
{
- ::rtl::OUString aQueryBoxTitle(ResId::toString(IDEResId(RID_STR_DLGIMP_MISMATCH_TITLE)));
- ::rtl::OUString aQueryBoxText(ResId::toString(IDEResId(RID_STR_DLGIMP_MISMATCH_TEXT)));
+ ::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE));
+ ::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT));
LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
sal_uInt16 nRet = aQueryBox.Execute();
if( RET_YES == nRet )
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 6702f9374d28..cb18b10968b1 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -175,7 +175,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
else
nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem );
- ::rtl::OUString aReplStr(ResId::toString(IDEResId(RID_STR_SEARCHREPLACES)));
+ ::rtl::OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES));
aReplStr = aReplStr.replaceAll("XX", rtl::OUString::valueOf(nFound));
InfoBox( pCurWin, aReplStr ).Execute();
}
@@ -203,7 +203,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
SfxViewFrame* pViewFrame = GetViewFrame();
SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL;
Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL;
- QueryBox aQuery(pParent, WB_YES_NO|WB_DEF_YES, ResId::toString(IDEResId(RID_STR_SEARCHFROMSTART)));
+ QueryBox aQuery(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART));
if ( aQuery.Execute() == RET_YES )
{
it = aIDEWindowTable.begin();
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 0e83a8ecdf4c..d256b2864411 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -136,13 +136,13 @@ void BasicIDEShell::SetMDITitle()
aTitleBuf.append(m_aCurLibName);
}
else
- aTitleBuf.append(ResId::toString(IDEResId(RID_STR_ALL)));
+ aTitleBuf.append(IDE_RESSTR(RID_STR_ALL));
::basctl::DocumentSignature aCurSignature( m_aCurDocument );
if ( aCurSignature.getScriptingSignatureState() == SIGNATURESTATE_SIGNATURES_OK )
{
aTitleBuf.append(' ');
- aTitleBuf.append(ResId::toString(IDEResId(RID_STR_SIGNED)));
+ aTitleBuf.append(IDE_RESSTR(RID_STR_SIGNED));
aTitleBuf.append(' ');
}
::rtl::OUString aTitle(aTitleBuf.makeStringAndClear());
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index a2f9a18c5903..3c00def9ab84 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -406,7 +406,7 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
if( bUI )
{
Window *pParent = &GetViewFrame()->GetWindow();
- InfoBox( pParent, ResId::toString(IDEResId(RID_STR_CANNOTCLOSE))).Execute();
+ InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute();
}
return sal_False;
}
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index cd9986ccff87..1461a3e51c97 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -179,7 +179,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
if ( rDocument.hasModule( rLibName, rNewName ) )
{
- ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) );
+ ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) );
aError.Execute();
return false;
}
@@ -187,7 +187,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
// #i74440
if ( rNewName.isEmpty() )
{
- ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_BADSBXNAME ) ) );
+ ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) );
aError.Execute();
return false;
}
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 338e5e01882a..8fa882ae5850 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -183,7 +183,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const
if ( rDocument.hasDialog( rLibName, rNewName ) )
{
- ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) );
+ ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) );
aError.Execute();
return false;
}
@@ -191,7 +191,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const
// #i74440
if ( rNewName.isEmpty() )
{
- ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_BADSBXNAME ) ) );
+ ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) );
aError.Execute();
return false;
}
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 34a1aaf1a839..9e78d750f2c5 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -408,10 +408,10 @@ void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEnt
{
::std::vector< std::pair< BasicEntryType, ::rtl::OUString > > aEntries;
- aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) );
- aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, ResId::toString( IDEResId( RID_STR_USERFORMS ) ) ) );
- aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, ResId::toString( IDEResId( RID_STR_NORMAL_MODULES ) ) ) );
- aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, ResId::toString( IDEResId( RID_STR_CLASS_MODULES ) ) ) );
+ aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) );
+ aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, IDE_RESSTR(RID_STR_USERFORMS) ) );
+ aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, IDE_RESSTR(RID_STR_NORMAL_MODULES) ) );
+ aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, IDE_RESSTR(RID_STR_CLASS_MODULES) ) );
::std::vector< std::pair< BasicEntryType, ::rtl::OUString > >::iterator iter;
for( iter = aEntries.begin(); iter != aEntries.end(); ++iter )
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index eb079eb8b72d..813d5bff8a54 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -756,7 +756,7 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey& rKey )
bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent )
{
- ::rtl::OUString aQuery( ResId::toString(rId) );
+ ::rtl::OUString aQuery(rId.toString());
::rtl::OUStringBuffer aNameBuf( rName );
aNameBuf.append('\'');
aNameBuf.insert(sal_Int32(0), sal_Unicode('\''));
@@ -804,7 +804,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
// set new title
if ( bNewTitle )
{
- ::rtl::OUString aTitle(ResId::toString(IDEResId(RID_STR_ENTERPASSWORD)));
+ ::rtl::OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD));
aTitle = aTitle.replaceAll("XX", rLibName);
pDlg->SetText( aTitle );
}
@@ -826,7 +826,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
if ( !bOK )
{
- ErrorBox aErrorBox( Application::GetDefDialogParent(), WB_OK, ResId::toString( IDEResId( RID_STR_WRONGPASSWORD ) ) );
+ ErrorBox aErrorBox( Application::GetDefDialogParent(), WB_OK, IDE_RESSTR(RID_STR_WRONGPASSWORD) );
aErrorBox.Execute();
}
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 05e27d37f4b1..99abdbcdf233 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -381,7 +381,7 @@ SbMethod* MacroChooser::CreateMacro()
if ( aModName.Len() )
{
// extract the module name from the string like "Sheet1 (Example1)"
- if( aDesc.GetLibSubName() == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) )
+ if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
{
sal_uInt16 nIndex = 0;
aModName = aModName.GetToken( 0, ' ', nIndex );
@@ -704,7 +704,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
String aLib( aDesc.GetLibName() );
String aMod( aDesc.GetName() );
// extract the module name from the string like "Sheet1 (Example1)"
- if( aDesc.GetLibSubName() == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) )
+ if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
{
sal_uInt16 nIndex = 0;
aMod = aMod.GetToken( 0, ' ', nIndex );
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index d0fe4085c401..f63a26882963 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -289,7 +289,7 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
::rtl::OUString aLibName = GetEntryText( pEntry, 0 );
if ( aLibName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) )
{
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_CANNOTCHANGENAMESTDLIB ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB) ).Execute();
return sal_False;
}
@@ -299,7 +299,7 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) && !xModLibContainer->isLibraryLink( aLibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
{
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_LIBISREADONLY ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_LIBISREADONLY) ).Execute();
return sal_False;
}
@@ -352,7 +352,7 @@ sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& r
}
catch (const container::ElementExistException& )
{
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED) ).Execute();
return sal_False;
}
catch (const container::NoSuchElementException& )
@@ -365,9 +365,9 @@ sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& r
if ( !bValid )
{
if ( rNewName.getLength() > 30 )
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_LIBNAMETOLONG ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_LIBNAMETOLONG) ).Execute();
else
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ).Execute();
}
return bValid;
@@ -384,7 +384,7 @@ IMPL_LINK_NOARG(NewObjectDialog, OkButtonHandler)
else
{
ErrorBox(this, WB_OK | WB_DEF_OK,
- ResId::toString(IDEResId(RID_STR_BADSBXNAME))).Execute();
+ IDE_RESSTR(RID_STR_BADSBXNAME)).Execute();
aEdit.GrabFocus();
}
return 0;
@@ -404,16 +404,16 @@ NewObjectDialog::NewObjectDialog(Window * pParent, NewObjectMode nMode,
switch (nMode)
{
case NEWOBJECTMODE_LIB:
- SetText( ResId::toString( IDEResId( RID_STR_NEWLIB ) ) );
+ SetText( IDE_RESSTR(RID_STR_NEWLIB) );
break;
case NEWOBJECTMODE_MOD:
- SetText( ResId::toString( IDEResId( RID_STR_NEWMOD ) ) );
+ SetText( IDE_RESSTR(RID_STR_NEWMOD) );
break;
case NEWOBJECTMODE_METH:
- SetText( ResId::toString( IDEResId( RID_STR_NEWMETH ) ) );
+ SetText( IDE_RESSTR(RID_STR_NEWMETH) );
break;
default:
- SetText( ResId::toString( IDEResId( RID_STR_NEWDLG ) ) );
+ SetText( IDE_RESSTR(RID_STR_NEWDLG) );
break;
}
@@ -442,7 +442,7 @@ GotoLineDialog::GotoLineDialog(Window * pParent )
FreeResource();
aEdit.GrabFocus();
- SetText( ResId::toString( IDEResId( RID_STR_GETLINE ) ) );
+ SetText( IDE_RESSTR(RID_STR_GETLINE) );
aOKButton.SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler));
}
@@ -828,7 +828,7 @@ void LibPage::InsertLib()
if ( !aLastFilter.isEmpty() )
xFltMgr->setCurrentFilter( aLastFilter );
else
- xFltMgr->setCurrentFilter( ResId::toString( IDEResId( RID_STR_BASIC ) ) );
+ xFltMgr->setCurrentFilter( IDE_RESSTR(RID_STR_BASIC) );
if ( xFP->execute() == RET_OK )
{
@@ -913,7 +913,7 @@ void LibPage::InsertLib()
}
if ( !pLibDlg )
- InfoBox( this, ResId::toString( IDEResId( RID_STR_NOLIBINSTORAGE ) ) ).Execute();
+ InfoBox( this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE) ).Execute();
else
{
sal_Bool bChanges = sal_False;
@@ -950,7 +950,7 @@ void LibPage::InsertLib()
// check, if the library is the Standard library
if ( aLibName == "Standard" )
{
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_REPLACESTDLIB ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_REPLACESTDLIB) ).Execute();
continue;
}
@@ -958,10 +958,10 @@ void LibPage::InsertLib()
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) && !xModLibContainer->isLibraryLink( aLibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
{
- ::rtl::OUString aErrStr( ResId::toString( IDEResId( RID_STR_REPLACELIB ) ) );
+ ::rtl::OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- aErrStr += ResId::toString( IDEResId( RID_STR_LIBISREADONLY ) );
+ aErrStr += IDE_RESSTR(RID_STR_LIBISREADONLY);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
}
@@ -973,12 +973,12 @@ void LibPage::InsertLib()
{
::rtl::OUString aErrStr;
if ( bReference )
- aErrStr = ResId::toString( IDEResId( RID_STR_REFNOTPOSSIBLE ) );
+ aErrStr = IDE_RESSTR(RID_STR_REFNOTPOSSIBLE);
else
- aErrStr = ResId::toString( IDEResId( RID_STR_IMPORTNOTPOSSIBLE ) );
+ aErrStr = IDE_RESSTR(RID_STR_IMPORTNOTPOSSIBLE);
aErrStr = aErrStr.replaceAll("XX", aLibName);
aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- aErrStr += ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED ) );
+ aErrStr += IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
}
@@ -996,7 +996,7 @@ void LibPage::InsertLib()
if ( !bOK )
{
- ::rtl::OUString aErrStr( ResId::toString( IDEResId( RID_STR_NOIMPORT ) ) );
+ ::rtl::OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index c86089ef8ff1..779d74c88e85 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -94,7 +94,7 @@ sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStr
sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText );
if ( !bValid )
{
- ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
+ ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ).Execute();
return sal_False;
}
@@ -651,7 +651,7 @@ void ObjectPage::CheckButtons()
// enable/disable delete button
if ( nDepth >= 2 && !bReadOnly && eLocation != LIBRARY_LOCATION_SHARE )
{
- if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( ( nDepth == 2 ) || aLibSubName == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
+ if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( ( nDepth == 2 ) || aLibSubName == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) )
aDelButton.Disable();
else
aDelButton.Enable();
@@ -689,7 +689,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
{
::rtl::OUString aModName( aDesc.GetName() );
// extract the module name from the string like "Sheet1 (Example1)"
- if( aDesc.GetLibSubName() == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) )
+ if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
{
sal_Int32 nIndex = 0;
aModName = aModName.getToken( 0, ' ', nIndex );
@@ -816,7 +816,7 @@ void ObjectPage::NewDialog()
if ( aDocument.hasDialog( aLibName, aDlgName ) )
{
ErrorBox( this, WB_OK | WB_DEF_OK,
- ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute();
+ IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) ).Execute();
}
else
{
@@ -933,7 +933,7 @@ LibDialog::LibDialog( Window* pParent )
aReferenceBox( this, IDEResId( RID_CB_REF ) ),
aReplaceBox( this, IDEResId( RID_CB_REPL ) )
{
- SetText( ResId::toString( IDEResId( RID_STR_APPENDLIBS ) ) );
+ SetText( IDE_RESSTR(RID_STR_APPENDLIBS) );
FreeResource();
}
@@ -944,7 +944,7 @@ LibDialog::~LibDialog()
void LibDialog::SetStorageName( const ::rtl::OUString& rName )
{
- ::rtl::OUString aName( ResId::toString( IDEResId( RID_STR_FILENAME ) ) );
+ ::rtl::OUString aName( IDE_RESSTR(RID_STR_FILENAME) );
aName += rName;
aStorageName.SetText( aName );
}
@@ -1011,7 +1011,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
if( pBasic && rDocument.isInVBAMode() )
{
// add the new module in the "Modules" entry
- SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, ResId::toString( IDEResId( RID_STR_NORMAL_MODULES ) ) , OBJ_TYPE_NORMAL_MODULES );
+ SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, IDE_RESSTR(RID_STR_NORMAL_MODULES) , OBJ_TYPE_NORMAL_MODULES );
if( pLibSubEntry )
{
if( !rBasicBox.IsExpanded( pLibSubEntry ) )
@@ -1040,7 +1040,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
catch (const container::ElementExistException& )
{
ErrorBox( pWin, WB_OK | WB_DEF_OK,
- ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute();
+ IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) ).Execute();
}
catch (const container::NoSuchElementException& )
{
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index a3bde8850d83..228b49b78522 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1522,9 +1522,9 @@ namespace basctl
{
switch ( _eType )
{
- case LIBRARY_TYPE_MODULE: aTitle = ResId::toString( IDEResId( RID_STR_USERMACROS ) ); break;
- case LIBRARY_TYPE_DIALOG: aTitle = ResId::toString( IDEResId( RID_STR_USERDIALOGS ) ); break;
- case LIBRARY_TYPE_ALL: aTitle = ResId::toString( IDEResId( RID_STR_USERMACROSDIALOGS ) ); break;
+ case LIBRARY_TYPE_MODULE: aTitle = IDE_RESSTR(RID_STR_USERMACROS); break;
+ case LIBRARY_TYPE_DIALOG: aTitle = IDE_RESSTR(RID_STR_USERDIALOGS); break;
+ case LIBRARY_TYPE_ALL: aTitle = IDE_RESSTR(RID_STR_USERMACROSDIALOGS); break;
default:
break;
}
@@ -1533,9 +1533,9 @@ namespace basctl
{
switch ( _eType )
{
- case LIBRARY_TYPE_MODULE: aTitle = ResId::toString( IDEResId( RID_STR_SHAREMACROS ) ); break;
- case LIBRARY_TYPE_DIALOG: aTitle = ResId::toString( IDEResId( RID_STR_SHAREDIALOGS ) ); break;
- case LIBRARY_TYPE_ALL: aTitle = ResId::toString( IDEResId( RID_STR_SHAREMACROSDIALOGS ) ); break;
+ case LIBRARY_TYPE_MODULE: aTitle = IDE_RESSTR(RID_STR_SHAREMACROS); break;
+ case LIBRARY_TYPE_DIALOG: aTitle = IDE_RESSTR(RID_STR_SHAREDIALOGS); break;
+ case LIBRARY_TYPE_ALL: aTitle = IDE_RESSTR(RID_STR_SHAREMACROSDIALOGS); break;
default:
break;
}
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 1941df09d8db..a66c95b8e4e5 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -797,7 +797,7 @@ sal_Bool DlgEdObj::supportsService( const sal_Char* _pServiceName ) const
if (nResId)
{
- aDefaultName = ResId::toString(IDEResId(nResId));
+ aDefaultName = IDE_RESSTR(nResId);
}
return aDefaultName;
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 856d523154d3..ccdb32ff26c5 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -98,9 +98,9 @@ ManageLanguageDialog::ManageLanguageDialog( Window* pParent, boost::shared_ptr<L
m_aHelpBtn ( this, IDEResId( PB_HELP ) ),
m_aCloseBtn ( this, IDEResId( PB_CLOSE ) ),
m_pLocalizationMgr ( _pLMgr ),
- m_sDefLangStr (ResId::toString(IDEResId(STR_DEF_LANG))),
- m_sDeleteStr (ResId::toString(IDEResId(STR_DELETE))),
- m_sCreateLangStr (ResId::toString(IDEResId(STR_CREATE_LANG)))
+ m_sDefLangStr (IDE_RESSTR(STR_DEF_LANG)),
+ m_sDeleteStr (IDE_RESSTR(STR_DELETE)),
+ m_sCreateLangStr (IDE_RESSTR(STR_CREATE_LANG))
{
FreeResource();
@@ -306,9 +306,9 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog( Window* pParent, boost::shar
// change to "Add Interface Language" mode
SetHelpId( HID_BASICIDE_ADDNEW_LANGUAGE );
m_pCheckLangLB = new SvxCheckListBox( this, IDEResId( LB_ADD_LANGUAGE ) );
- SetText( ResId::toString( IDEResId( STR_ADDLANG_TITLE ) ) );
- m_aLanguageFT.SetText( ResId::toString( IDEResId( STR_ADDLANG_LABEL ) ) );
- m_aInfoFT.SetText( ResId::toString( IDEResId( STR_ADDLANG_INFO ) ) );
+ SetText( IDE_RESSTR(STR_ADDLANG_TITLE) );
+ m_aLanguageFT.SetText( IDE_RESSTR(STR_ADDLANG_LABEL) );
+ m_aInfoFT.SetText( IDE_RESSTR(STR_ADDLANG_INFO) );
}
FreeResource();
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 3dddfbc4fa7e..0ffda09dcea8 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -324,8 +324,8 @@ void PropBrw::implSetNewObjectSequence
{
xObjectInspector->inspect( _rObjectSeq );
- ::rtl::OUString aText = ResId::toString(IDEResId(RID_STR_BRWTITLE_PROPERTIES));
- aText += ResId::toString(IDEResId(RID_STR_BRWTITLE_MULTISELECT));
+ ::rtl::OUString aText = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES);
+ aText += IDE_RESSTR(RID_STR_BRWTITLE_MULTISELECT);
SetText( aText );
}
}
@@ -354,7 +354,7 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
if (xServiceInfo.is()) // single selection
{
sal_uInt16 nResId = 0;
- aName = ResId::toString(IDEResId(RID_STR_BRWTITLE_PROPERTIES));
+ aName = IDE_RESSTR(RID_STR_BRWTITLE_PROPERTIES);
if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ) )
{
@@ -447,12 +447,12 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
if (nResId)
{
- aName += ResId::toString(IDEResId(nResId));
+ aName += IDE_RESSTR(nResId);
}
}
else if (!_rxObject.is()) // no properties
{
- aName = ResId::toString(IDEResId(RID_STR_BRWTITLE_NO_PROPERTIES));
+ aName = IDE_RESSTR(RID_STR_BRWTITLE_NO_PROPERTIES);
}
return aName;
diff --git a/basctl/source/inc/iderid.hxx b/basctl/source/inc/iderid.hxx
index c9a72affaa00..4487c6aeaa83 100644
--- a/basctl/source/inc/iderid.hxx
+++ b/basctl/source/inc/iderid.hxx
@@ -37,6 +37,7 @@ public:
IDEResId( sal_uInt16 nId );
};
+#define IDE_RESSTR(x) IDEResId(x).toString()
#endif //_IDERID_HXX